#27 Python Tutorial for Beginners | Array values from User in Python | Search in Array

Описание к видео #27 Python Tutorial for Beginners | Array values from User in Python | Search in Array

Check out our courses:

Java Full Stack and Spring AI - https://go.telusko.com/JavaSpringAI
Coupon: TELUSKO10 (10% Discount)

DevOps with AWS: From Basics to Mastery : https://go.telusko.com/DevOpsAWS
Coupon: TELUSKO10 (10% Discount)

Master Java Spring Development : https://go.telusko.com/masterjava
Coupon: TELUSKO20 (20% Discount)

Udemy Courses:

Spring: https://go.telusko.com/udemyteluskosp...
Java:- https://go.telusko.com/udemyteluskojava
Java Spring:- https://go.telusko.com/Udemyjavaspring
Java For Programmers:- https://go.telusko.com/javaProgrammers
Python : https://go.telusko.com/udemyteluskopy...
Git : https://go.telusko.com/udemyteluskogit
Docker : https://go.telusko.com/udemyteluskodo...

For More Queries WhatsApp or Call on : +919008963671

website : https://courses.telusko.com/

Instagram :   / navinreddyofficial  
Linkedin :   / navinreddy20  
TELUSKO Android App : https://bit.ly/TeluskoApp
Discord :   / discord  

In this lecture we will learn:
How to create an empty array?
How to create an array through user input?
Array creation by taking the values from a user
How to search an element in an array?
Function used to get the index value of an element in python

#1
We can also create a blank array and can take the values for it from the user.
First, we have to take the length of an array from the user.
input() function takes the value in the form of a string, so we have to change it into an integer using int().
We can run a loop in a range of length of an array given by the user. At each iteration, we can take a value to be inserted in an array.
append() is a function that is used to add a value or an element in an array.

#2
To search for any value in an array or to check the index number at which the value is present, we need to increment the value of an iterator variable in every iteration.
When the condition of comparison gets true, we stop the loop to iterate further and print the value of an iterator variable.
The iterator variable will return an index number of the value, you have searched for.

#3
index() function can also be used to get the index number of a value in an array.

Github :- https://github.com/navinreddy20/Python-

Python for Beginners :- http://bit.ly/3JOLQhl

Java and Spring Framework For beginners with Spring Boot : - http://bit.ly/3LDMj8D

Java Tutorial for Beginners (2023) :- http://bit.ly/3yARVbN

Editing Monitors :
https://amzn.to/2RfKWgL
https://amzn.to/2Q665JW
https://amzn.to/2OUP21a.

Subscribe to our other channel:
Navin Reddy : https://www.youtube.com/channel/UCxmk...
Telusko Hindi :
https://www.youtube.com/channel/UCitz...


Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
http://www.telusko.com/contactus

Комментарии

Информация по комментариям в разработке