We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd87bc7 commit aae53e5Copy full SHA for aae53e5
List_AppCode.py
@@ -0,0 +1,13 @@
1
+def main():
2
+ names = []
3
+
4
+ # Append names to the list
5
+ names.append("Robin")
6
+ names.append("Aman")
7
+ names.append("Rahul")
8
9
+ print(names)
10
+ return 0
11
12
+if __name__ == '__main__':
13
+ main()
Tuple_String.py
@@ -0,0 +1,24 @@
+#change value at index 0 of both tuple to string "number"
+ tuple1 = tuple(("one", "two", "three"))
+ tuple2 = tuple(("1", "2", "3"))
+ # Convert tuples to lists
+ list1 = list(tuple1)
+ list2 = list(tuple2)
+ # Modify values at index 0
+ list1[0] = "number"
+ list2[0] = "number"
14
+ # Convert lists back to tuples
15
+ tuple1 = tuple(list1)
16
+ tuple2 = tuple(list2)
17
18
+ print(tuple1)
19
+ print(tuple2)
20
21
22
23
24
0 commit comments