All posts by Tuna Peyo

Sorting lists temporarily

Aug 7,97

Consider the following list of surnames: last_names = 'Jones', 'Antunovich', 'Daniels', 'Thomson' Let’s print the list: print(last_names) 'Jones', 'Antunovich', 'Daniels', …

Read More

Check whether a value is in a list

Aug 7,97

You will often want to check if a certain value appears in a list, e.g. during a registration process to …

Read More

Loop through a list

Aug 7,97

Often times you would want to run through all the items in a list and perform the same action on …

Read More

Modify lists

Aug 7,97

Changing the value of a list element in Python is easy: my_numbers0 = 6 print(my_numbers0) The output confirms that the …

Read More

What are lists?

Aug 7,97

Similar to arrays in some other programming languages, lists in Python are used to store a set of elements under …

Read More

Concatenating strings

Aug 5,97

You can concatenate (combine) strings in Python using the plus sign. Consider the following example: name = 'Mike' surname = …

Read More
Geek University 2022