DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python swap two values in list
a_list = ["a", "b", "c"] a_list[0], a_list[2] = a_list[2], a_list[0] print(a_list) # ["c", "b", "a"]
Source by www.kite.com #
PREVIOUS
NEXT
Tagged:
#python
#swap
#values
#list
ADD COMMENT
Topic
COMMENT
Name
5+9 =
Submit