All posts by Tuna Peyo

Read a file

Aug 10,97

To read a file we’ve created in the previous lesson, we need to create a file object, but this time …

Read More

How to read and write files

Aug 10,97

Reading and writing files in Python is really easy since you don’t need to import a library – everything needed …

Read More

Looping over a tuple

Aug 9,97

Just like with lists, to loop through each item in a tuple, the for loop can be used: names = …

Read More

What are tuples?

Aug 9,97

Tuples in Python are similar to lists in a way that they are used to store a set of elements …

Read More

Loop through a dictionary

Aug 8,97

Just like you can do it with lists, you can use a for loop to loop through a dictionary. To …

Read More

Delete a key-value pair in a dictionary

Aug 8,97

It is really easy to remove a key-value pair from a dictionary – you only need to specify the key …

Read More
Geek University 2022