Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Tuple: Nested Tuple and List

# list and tuple can contain mixed datatypes, and nested in anyway

my_list =  [3, "4", [11, "12"], ("a", 2), 5]
my_tuple = (3, "4", [11, "12"], ("a", 2), 5)

print(my_list)
# [3, '4', [11, '12'], ('a', 2), 5]

print(my_tuple)
# (3, '4', [11, '12'], ('a', 2), 5)
Source by xahlee.info #
 
PREVIOUS NEXT
Tagged: #Nested #Tuple #List
ADD COMMENT
Topic
Name
5+3 =