English

Predict the output of the Python code given below: tuple1 = (11, 22, 33, 44, 55 ,66) list1 =list(tuple1) new_list = [] for i in list1: if i%2==0: new_list.append(i) new_tuple = tuple(new_list) print - Computer Science (Python)

Advertisements
Advertisements

Question

Predict the output of the Python code given below:

tuple1 = (11, 22, 33, 44, 55 ,66)
list1 =list(tuple1)
new_list = []
for i in list1:
 if i%2==0:
 new_list.append(i)
new_tuple = tuple(new_list)
print(new_tuple)
Numerical
One Line Answer

Solution

(22,44,66)

shaalaa.com
Appending in a Binary Files
  Is there an error in this question or solution?
2022-2023 (March) Sample
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×