A dictionary is a data structure that uses the key:value pairs and can be written in the following way:
animals = {'dog': 'woof', 'pig': 'oink', 'horse': 'neigh', 'cat': 'meow'}
Continue reading A dictionary is a data structure that uses the key:value pairs and can be written in the following way:
animals = {'dog': 'woof', 'pig': 'oink', 'horse': 'neigh', 'cat': 'meow'}
Continue reading You can run Python in PowerShell the same way as from the command bar.
Continue readingWhen we develop applications, the problem we often face is a string to datetime conversion. We have to deal with different formats and time zones. Sometimes we need to convert dates and times to human-readable format, and vice versa.
Continue readingYou can pass a list as an argument of Python function the same way as any other type and it will be the same type inside the function.
Continue readingIf you need to check, whether a particular word is a word in the English dictionary, you can do it in Python.
Continue readingWith a few lines of code, you can read a file in Python.
You have to specify an absolute path to the file you want to read, or you can specify the current working directory.
Continue readingYou can create a Python file directly from the terminal. Follow these steps to do it:
Continue readingSubscript and superscript are important when you are dealing with different types of formulas. They are useful in math, chemistry, etc.
Continue readingThis lesson is about the Python module called pickle. I’ll tell you what is pickle and how you can use it in Python.
Continue readingThe append method adds an element at the end of the list. No function will add an element at the beginning of a list, but there is a method called insert, that you can use to insert an element in any place you want.
Continue reading