Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Corsi
Slides Corsi Python
intro
Commits
9a594f5a
Commit
9a594f5a
authored
Apr 24, 2019
by
JackV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the tuple section back
parent
8f229084
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
content.md
content.md
+26
-0
No files found.
content.md
View file @
9a594f5a
...
...
@@ -228,6 +228,32 @@ lista = [False, 1, "due", 3.0, 4, 5]
----
## Tuple (`tuple`)
-
Esattamente come le liste, ma
**immutabili**
-
Sono quindi anche
**ordinate**
-
Si definiscono con le parentesi tonde
```
python
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'
```
----
## Dizionari (`dict`)
-
Associano ogni chiave ad un valore
...
...
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