Showing posts with label fundamentals. Show all posts
Showing posts with label fundamentals. Show all posts

11/9/22

check data type for all elements in a list

For more codes click here 

#check data type for all elements in a list


a = [1,"pease", 4, "dog"]


for i in a:

    if isinstance(i, int):

        print(f"{i} is an integer")

    elif isinstance(i, str):

        print(f"{i} is a string")

    else:

        pass


6/30/22

Python Namespaces

 A namespace is a collection of names and the details of the objects that the names refer to.

Python PIP

 PIP is a package management system that is used to install and manage Python-based software packages.

Python as an OOPs

 For those of you who don't know, oop stands for Object-Oriented Programming. Is python an oop, and why?

Python Function

 Function is a collection of operations which can be easily accessed throughout a program. these operation accepts a variable and passes it through the stated operations to give an output.

Python Loops and Iterations

 Loops are used to iterate within a set of variables. This can either be a list, string, tuple etc.

Python Conditionals

Conditionals are used to carry out functions which are depending on set rules I e conditions. To work with conditionals, you'll need to declare the if ..... else statement. 

6/29/22

Python Fundamentals

Who should learn python?
Everyone, python is a good starting point for anyone looking for a career in tech, it is easy to learn and is in high demand.
It's is also a good place to start if you don't know what field of programming you wish to base in as python can be used in game development, software development, web application and data science.

Blog Archive