Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrew
intro
Commits
2869d1e9
Commit
2869d1e9
authored
May 07, 2017
by
Tancredi Orlando
Browse files
Expand tuple section.
parent
6d967001
Changes
1
Hide whitespace changes
Inline
Side-by-side
day_1.md
View file @
2869d1e9
...
...
@@ -340,7 +340,21 @@ lista = [false, 1, "due", 3.0, 4, 5]
-
Si definiscono con le parentesi tonde
```
python
tupla
=
(
'a'
,
1
,
2
,
'bcd'
)
tupla
=
(
'a'
,
1
,
2
,
'3.0'
)
```
```
>>> tupla[1] = 1.0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
```
```
>>> tupla.append('sei')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'tuple' object has no attribute 'append'
```
----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment