Returning multiple values from a Python function using tuples: more on the protein charge function

Published: 11 October 2023
on channel: PatchyPython
42
0

Another example from "Python for Bioinformatics" by Sebastian Bassi: given a peptide sequence, we compute its approximate charge and the proportion of charged residues and return both as a tuple. This is a very Pythonic way of returning multiple values from a function; it is also very convenient, as the calling code can unpack the tuple on the fly. Check out the notebook linked below for more information on functions in Python.

Embedded video, part of the following course:
Coding for Scientists at Queen Mary, University of London
Jupyter notebook: https://tinyurl.com/5hav5u8m

Notebooks will open on Google Colab - no installation required


On this page of the site you can watch the video online Returning multiple values from a Python function using tuples: more on the protein charge function with a duration of hours minute second in good quality, which was uploaded by the user PatchyPython 11 October 2023, share the link with friends and acquaintances, this video has already been watched 42 times on youtube and it was liked by 0 viewers. Enjoy your viewing!