Skip to content

Commit

Permalink
Adds demonstrating conversion to encoded byte string
Browse files Browse the repository at this point in the history
  • Loading branch information
hlapp committed Oct 24, 2024
1 parent 6f6ba92 commit fa1ccb1
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Python-ML/Python-for-ML_01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,16 @@
"type(s), list(s)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"s = 'ACGT'\n",
"s.encode(), s.encode('utf-8'), s.encode('ascii')"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -961,7 +971,7 @@
"\n",
" @property\n",
" def name(self):\n",
" return super().name + f' ({self.program} program)'\n"
" return super().name + f' ({self.program} program)'"
]
},
{
Expand Down Expand Up @@ -1040,7 +1050,15 @@
"metadata": {},
"outputs": [],
"source": [
"from collections.abc import Iterable\n",
"from collections.abc import Iterable"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"type(Day), isinstance(Day, Iterable)"
]
},
Expand Down

0 comments on commit fa1ccb1

Please sign in to comment.