Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python_one_week_4_biologists_solutions
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub-courses
python_one_week_4_biologists_solutions
Commits
5265e795
Unverified
Commit
5265e795
authored
4 years ago
by
Bertrand NÉRON
Browse files
Options
Downloads
Patches
Plain Diff
:allow to donload enzyme*_namedtuple.py scripts
parent
1f2f3aea
No related branches found
No related tags found
No related merge requests found
Pipeline
#57946
passed
4 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/Collection_Data_Types.rst
+2
-1
2 additions, 1 deletion
source/Collection_Data_Types.rst
source/Control_Flow_Statements.rst
+2
-2
2 additions, 2 deletions
source/Control_Flow_Statements.rst
with
4 additions
and
3 deletions
source/Collection_Data_Types.rst
+
2
−
1
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
--------
...
...
This diff is collapsed.
Click to expand it.
source/Control_Flow_Statements.rst
+
2
−
2
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment