Create a list words = ['is', 'NLP', 'fun', '?']. Use a series of assignment statements (e.g. words[1] = words[2]) and a temporar
y variable tmp to transform this list into the list ['NLP', 'is', 'fun', '!']. Now do the same transformation using tuple assignment.
1 answer:
Answer:
words = ['is', 'NLP', 'fun', '?']
tmp = words[1]
words[1] = words[0]
words[0] = tmp
words[3] = '!'
print(words)
Explanation:
- Create the list
- Assign the new values using <em>tmp</em> variable
- Print the result
Since tuples in Python are unchangeable, you cannot transform the list using tuple assignment.
You might be interested in
Answer:
Right index
Explanation:
AMPERE - a unit of measure for the flow of the current in a circut
Answer:
Microsoft PowerPoint.
Explanation:
Because, it is industry standard and widely recognized and used in world.
Explanation:
wuwhwhwhshahahabahsgsgagsgshshshsjeushsjsjsiajausudid
idirieieirieeie
iep
The answer is career clusters.