Answer to Question #220641 in Python for abrar

Question #220641

write a program that keep taking input(character) until the user enter a dot'.'.in python loop


1
Expert's answer
2021-07-28T03:00:05-0400
def main():
    input = ''
    while True:
        char = sys.stdin.read(1)
        if (char == '.') break else input += char;
    print(input)    std:

if __name__ == '__main__':
    main()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS