Answers for "python print space separated list"

3

take space separated int input in python

inp = list(map(int,input().split()))
Posted by: Guest on July-08-2020
3

python list comma separated string

hobbies = ["basketball", "football", "swimming"]
print("My hobbies are:")      	# My hobbies are:
print(", ".join(hobbies)) 		# basketball, football, swimming
Posted by: Guest on February-16-2021
0

print list as space separated python

>>> marks = [12, 23, 34, 56]
>>> print(marks)
[12, 23, 34, 56]
>>> print(*marks)
12 23 34 56

// *[listName] can be used to pass all elememts as separate arguements
Posted by: Guest on December-19-2020

Code answers related to "python print space separated list"

Python Answers by Framework

Browse Popular Code Answers by Language