Thursday 24 May 2018

Get a list of integers from user in python

>>> arr= map(int, raw_input().split())
3 4 6 7 8
>>> arr
[3, 4, 6, 7, 8]

No comments:

Post a Comment

list operations in python

How to make each term of an array repeat, with the same terms grouped together? i/p: [A,B,C] o/p: [A,A,A,B,B,B,C,C,C] Solution: >...