0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Python解説を覚え書き 5 - Lists

Last updated at Posted at 2020-12-21

# A list stores values inside of the array. friends = ["Kevin", "Karen", "Jim"]

# How can we access individual elements print(friends)

# Refer to elements by their index. print(friends[0]) print(friends[-1]) print(friends[1:])

friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] print(friends[1:4]) # not including 4

friends[1] = "Mike" # Modify a value inside the array. print(friends[1])

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?