Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def PrintList(seq):
- string = ''
- for num in seq:
- if isinstance(num, list):
- string += '2^(' + str(PrintList(num)) + ')'
- continue
- else:
- string += '2^' + str(num)
- if seq.index(num) == len(seq) - 1:
- print(string)
- return string
Add Comment
Please, Sign In to add comment