Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f():
- lst = []
- while True:
- try:
- elem = int(input('Enter the tuple elements : '))
- lst.append(elem)
- except ValueError:
- break
- for i in range(len(tuple(lst))):
- print("tuple1[%d] = %d" % (i, tuple(lst)[i]))
- f()
Advertisement
Add Comment
Please, Sign In to add comment