1def add(*args): # *args takes multiple inputs
2 return sum(args)
3
4
5print(add(1,2,3,4,5)) # prints 15
6print(add(10, 20, 30)) # prints 60
1>>> numbers = [2, 1, 3, 4, 7]
2>>> more_numbers = [*numbers, 11, 18]
3>>> print(*more_numbers, sep=', ')
42, 1, 3, 4, 7, 11, 18
5
1>>> fruits = ['lemon', 'pear', 'watermelon', 'tomato']
2>>> print(fruits[0], fruits[1], fruits[2], fruits[3])
3lemon pear watermelon tomato
4>>> print(*fruits)
5lemon pear watermelon tomato
6
1#The (!) is the not operator in Python, (!=) means not equal to.
2if 2!=10:
3 print("2 isn't equal to 10.")
4elif 2=10:
5 print("2 is equal to 10.")
6#Prints "2 isn't equal to 10." as 2 isn't equal to 10. Is it?