-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
New example for scope using a for loop
#!/usr/bin/env python3
import sys
gene = sys.argv[1] ## user input was brca1
genes = { 'hdac' : 'aaaaa' , 'piwi' : 'ttttt' }
print("Users favorite gene: " , gene)
for gene in genes:
gene_length = len( genes[gene] )
print(gene, gene_length)
print("Users favorite gene: " , gene)
Output
(py3.7) mp181vbhv2j:scripts smr$ python3 scope_for_loops.py brca1
Users favorite gene: brca1
hdac 5
piwi 5
Users favorite gene: piwi
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels