Free Python tutorial for beginners-Python Built in functions - map () function - How to use it

Publicado em: 18 Agosto 2023
no canal de: KeeshtuTechnology
24
1

Free Python tutorial for beginners-Python Built in functions - map () function - How to use it

Subscribe Here -https://www.youtube.com/@KeeshtuTechn...

#python#pythonprogramming #pythontutorial #pythonforbeginners #pythonclass #youtubechannels #pythoninstallationcomplete #pythonhowtoinstall #pythoninstall #pythondownload #pythontutorialfree #pythonyoutube #pythonenglish #pythonenglish #pythonexecvseval #pythonexec()vseval() #pythonexec() #pythoneval() #youtubeviews #pythondef #pythondef() #pythonfunctions #pythonbreak #pythoncontinue #pythonpass #pythonzip #pythonunzip #pythonprintescapecharacter #pythonrepr() #python #pythonmap #pythonfunction #pythonfunctions
Please Captions on - Python in English, Python in Tamil, Python in Telugu, Python in Malayalam, Python in Chinese, Python in Japanese, Python in German, Python in Hindi, Python in French, Python full course for beginners

hello welcome to technology platform so today we are going to see like some built-in functions the first is like map function so how to use it let's see let me open idle so now here earlier like if you want to iterate you're always using the E for Loop so for example uh if I want to do some addition and I am passing this one and then enter I have to like uh return n plus N I want to add it two values so now if I want to print this how do I give it here that I just use for I in I will give you like one comma two comma three three things I need to add it and then here want to print it and then add off I'm just calling that function and then I then it will give like one plus one two two plus two four three plus three six like that it will give you see this result two four six like this but I don't want to use for function in a for Loop so instead of that we have some inbuilt functions to do an iterate so that is called map so the map syntax is like

map Open Bracket function name comma I travel so whatever you want to iterate you can just do an iterative now let's see this how I am going to do it so the same definitions I'm going to write it and then I have to directly pass print I am not writing for Loop you see this print um okay one more thing I will tell you like so here

I will say like result equal to I am just keeping that values in the map so function name is that add comma and then I can just pass like one comma 2 comma 3.

and then I will close it now if you want to print off map this will gives an error message because if you want to use it map you have to use it at least set list Tuple something you have to use it then only this will give you end result let's see this this will give an error message something like this now if I use it print off list of result I will call like this then you are getting the same value 246 246 so you can also use Tuple So based on the input you can give like this also so print of result whatever so based on the result it will come the proper result

things as well like if you want to add some both strings then let's see now um I'll say like def my function

um string one comma string two like that I am going to do something here now I just say like return string 1 plus string two I am just going to concern it to string that's a simple thing right now I just close this I want to use it like result equal to I have to use it map function and then I have to my function Open Bracket we have two strings right now two strings you have to give it how you want to give it like you are not going to give like this see this my function comma you're just passing because the syntax is like function name you given function name now the iterative value a comma B you have to give it like string one comma string two you have to give it so string one I can say like python Java

string two I can say like chapters 10 chapters 11 chapters like that I'm going to give it and close it now print off and then list of

result let's see this so you can see like python 10 Java 11. so instead of that I will say like

so just for your readable format I can write it like this now if you want to print it

it will give like this so we are just simply avoiding the iteration instead of direct for Loop we simply using this kind of map and then we are directly using civil so because of the purpose so we are using this kind of map function to retrieve easier like this so see you in the next class bye


Nesta página do site você pode assistir ao vídeo on-line Free Python tutorial for beginners-Python Built in functions - map () function - How to use it duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário KeeshtuTechnology 18 Agosto 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 24 vezes e gostou 1 espectadores. Boa visualização!