<reponame>JUD210/Study-Note<gh_stars>0
""" Quiz: Enumerate

Use enumerate to modify the cast list so that each element contains the name followed by the character's corresponding height. For example, the first element of cast should change from "<NAME>" to "<NAME> 72".
"""

cast = [
    "<NAME>",
    "<NAME>",
    "<NAME>",
    "<NAME>",
    "<NAME>",
]
heights = [72, 68, 72, 66, 76]

# write your for loop here
for i, height in enumerate(heights):
    cast[i] += " {}".format(height)

print(cast)

""" Solution """

# for i, character in enumerate(cast):
#     cast[i] = character + " " + str(heights[i])

# print(cast)
""" Quiz: Enumerate

Use enumerate to modify the cast list so that each element contains the name followed by the character's corresponding height. For example, the first element of cast should change from "<NAME>" to "<NAME> 72".
"""

cast = [
    "<NAME>",
    "<NAME>",
    "<NAME>",
    "<NAME>",
    "<NAME>",
]
heights = [72, 68, 72, 66, 76]

# write your for loop here
for i, height in enumerate(heights):
    cast[i] += " {}".format(height)

print(cast)

""" Solution """

# for i, character in enumerate(cast):
#     cast[i] = character + " " + str(heights[i])

# print(cast)
Quiz: Enumerate  Use enumerate to modify the cast list so that each element contains the name followed by the character's corresponding height. For example, the first element of cast should change from "<NAME>" to "<NAME> 72". # write your for loop here Solution # for i, character in enumerate(cast): #     cast[i] = character + " " + str(heights[i]) # print(cast)