add number to tuple python code example
Example 1: get list number python
my_list = [1,"hello world", 16.2]
len(my_list)
3
Example 2: how to create an array in python
array = ["1st", "2nd", "3rd"]
#prints: ['1st', '2nd', '3rd']
array.append("4th")
#prints: ['1st', '2nd', '3rd', '4th']
Example 3: how to convert a list to a string in python
array = []
STR = ''
for i in array:
STR = STR+i
Example 4: tuple add
a = (1, 2, 3)
b = a + (4, 5, 6) # (1, 2, 3, 4, 5, 6)
c = b[1:] # (2, 3, 4, 5, 6)