Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub-courses
python_one_week_4_biologists_solutions
Commits
5265e795
Unverified
Commit
5265e795
authored
Jun 06, 2021
by
Bertrand NÉRON
Browse files
:allow to donload enzyme*_namedtuple.py scripts
parent
1f2f3aea
Pipeline
#57946
passed with stages
in 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
source/Collection_Data_Types.rst
View file @
5265e795
...
...
@@ -537,7 +537,7 @@ the latter algorithm display the number of occurrence of each enzyme, But we can
We will see how to do this later.
Bonus
"""""
^^^^^
There is another kind of tuple which allow to access to itmes by index or name.
This data collection is called NamedTuple. The NamedTuple are not accessible directly they are in `collections` package,
...
...
@@ -565,6 +565,7 @@ The code must be adapted as below
:linenos:
:language: python
:download:`enzymes_1_namedtuple.py <_static/code/enzyme_1_namedtuple.py>` .
Exercise
--------
...
...
source/Control_Flow_Statements.rst
View file @
5265e795
...
...
@@ -212,11 +212,11 @@ and the 2 dna fragments: ::
:download:`restriction.py <_static/code/restriction.py>` .
Bonus
"""""
^^^^^
If you prefer the enzyme implemeted as namedtuple
:download:`restriction.py <_static/code/restriction_namedtuple.py>` .
:download:`restriction
_namedtuple
.py <_static/code/restriction_namedtuple.py>` .
Exercise
...
...
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