Guidelines

λ”•μ…”λ„ˆλ¦¬μ— μš”μ†Œ μΆ”κ°€ 및 μˆ˜μ •ν•˜κΈ°

λ”•μ…”λ„ˆλ¦¬λŠ” ν‚€(Key)λ₯Ό 톡해 데이터λ₯Ό κ΄€λ¦¬ν•˜λ©°, ν‚€λ₯Ό 지정해 μƒˆλ‘œμš΄ 값을 μΆ”κ°€ν•˜κ±°λ‚˜ κΈ°μ‘΄ 값을 μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

μƒˆλ‘œμš΄ ν‚€-κ°’ μŒμ„ μΆ”κ°€ν•˜λ €λ©΄, λŒ€κ΄„ν˜Έ([]) μ•ˆμ— ν‚€λ₯Ό μž…λ ₯ν•˜κ³  ν•΄λ‹Ή κ°’μœΌλ‘œ ν• λ‹Ήν•˜λ©΄ λ©λ‹ˆλ‹€.

λ”•μ…”λ„ˆλ¦¬μ— κ°’ μΆ”κ°€ν•˜κΈ°
user = { "username": "codefriends", "created_at": "2024-01-01" } # "직업" 킀에 "개발자" 값을 μΆ”κ°€ user["gender"] = "male" # "male" 좜λ ₯ print(user["gender"])

λ”•μ…”λ„ˆλ¦¬ κ°’ μˆ˜μ •

이미 μ‘΄μž¬ν•˜λŠ” 킀에 μƒˆλ‘œμš΄ 값을 ν• λ‹Ήν•˜λ©΄ ν•΄λ‹Ή ν‚€μ˜ κΈ°μ‘΄ 값을 μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

λ”•μ…”λ„ˆλ¦¬μ— κ°’ μˆ˜μ •
user = { "username": "codefriends", "created_at": "2024-01-01" } user["username"] = "geekhaus" # "geekhaus" 좜λ ₯ print(user["username"])
Mission
0 / 1

λ”•μ…”λ„ˆλ¦¬μ— μƒˆλ‘œμš΄ ν‚€-κ°’ μŒμ„ μΆ”κ°€ν•˜λŠ” λ°©λ²•μœΌλ‘œ μ˜³μ€ 것은 λ¬΄μ—‡μΌκΉŒμš”?

λ”•μ…”λ„ˆλ¦¬μ˜ ν‚€λ₯Ό μ‚­μ œν•˜κ³  μƒˆλ‘œμš΄ ν‚€λ₯Ό μΆ”κ°€ν•œλ‹€.

λ”•μ…”λ„ˆλ¦¬λ₯Ό λ³΅μ‚¬ν•œ ν›„ μƒˆλ‘œμš΄ ν‚€λ₯Ό μΆ”κ°€ν•œλ‹€.

λŒ€κ΄„ν˜Έ []λ₯Ό μ‚¬μš©ν•˜μ—¬ ν‚€λ₯Ό μ§€μ •ν•˜κ³  값을 ν• λ‹Ήν•œλ‹€.

λ”•μ…”λ„ˆλ¦¬μ—λŠ” μƒˆλ‘œμš΄ ν‚€λ₯Ό μΆ”κ°€ν•  수 μ—†λ‹€.

Guidelines

AI Tutor

Publish

Design

Upload

Notes

Favorites

Help

Code Editor

Run
Generate

Execution Result