Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Function in Python

Welcome to EasyCoding with Ammara
Subscribe My Coding Channel:
https://www.youtube.com/channel/UC8UsfNYmbKiRJvI9ZhhApEw?view_as=subscriber

Subscribe my personal YouTube Channel:
https://www.youtube.com/channel/UCa93R2oNQMuX0fOKa9eV4zg?view_as=subscriber

Let's Start


Count Length:

course="hello"
print(len(course))          // 5

Round Function:

z=2.9

print(round(z))      //3

Matrix Declaration and initialization:

matrix=[
    [2, 3],
    [4, 4]
]
print(matrix[0][1])               //3

Append Function:

number=[1,2]
number.append(20)
print(number)                  //[1,2,20]

Copy Function:

number=[1,2]
num2=number.copy()
print(num2)                              //[1,2]

User Define function:

def Myfunction():
    print("hello world")                     
Myfunction()                         //hello world


This post first appeared on AR Programming, please read the originial post: here

Share the post

Function in Python

×

Subscribe to Ar Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×