#4 Python Tutorial for Beginners | Variables in Python
Vložit
- čas přidán 1. 07. 2018
- Check out our courses:
Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
Coupon: TELUSKO10 (10% Discount)
Master Java Spring Development : bit.ly/java-spring-cloud
Udemy Courses:
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
Java For Programmers:- bit.ly/javaProgrammers
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
TELUSKO Android App : bit.ly/TeluskoApp
In this lecture we are discussing variable in python:
Variable: It is a container where we can put our value
e.g
x=2 #here x is variable and 2 is value
x+3
5
y=3
Note:If I want to use output of previous operation so we use underscore (_)
_+y
8 # previous output 5 and y is 3
Use String as a variable:
-- Strings in python are surrounded by either single quotation marks, or double quotation marks.
-- e.g "shiva" ,'shiva'
Assign String to a Variable:
-- Assigning a string to a variable is done with the variable name followed by an equal sign and the string:
name='shiva'
name
shiva
Slicing String:
we can return a range of characters by using the slice syntax.
Specify the start index and the end index, separated by a colon, to return a part of the string.
-- Get the characters from position 2 to position 5 (not included):
name='youtube'
name[2:5]
'utu'
Slice From the Start:
name[:5] #from starting to index 5 (exclude)
'youtu'
Slice To the End:
name[2:] #from 2nd index to end
'utube'
Negative Indexing:
0 1 2 3 4 5 6 #positive indexing
y o u t u b e
-7 -6 -5 -4 -3 -2 -1 #Negative indexing
name[-1]
'e'
name[:-1]
'youtub'
name[:]
'youtube'
name [:0]
''
name[-5:-2]
'utu'
Concatenate String:
name+ ' telusko'
'youtube telusko'
Github :- github.com/navinreddy20/Python-
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com - Věda a technologie
Navin Reddy has 11 characters (including space between two words)
Can we count these characters without space?
Correct😀
no
How would you write the string to only count letters?
@@danyjovial1051 no it is not possible
Making such a effort without expecting anything and explaining with lots of clarity is really awesome,and huge respect to you
100th like is from me
Yes
Yaaa
True...💯💯❤️
really loving sir... god bless you
1. print(r '
') means print as it is.
2. _ (underscore represents) result of last.
3. name[-1] last digit of array
4. name[-2] last but digit of array
5. name[0:2] if name = ajit it will print 'aj'
6. name[0:3] if name = ajit it will print 'aji'
7. len(name) it will print 4(length of the ajit)
8. if a = ajit a[1:3] - when you print this it will give "ji" not "jit" because indexing excludes the last letter.
good going , summary of the session
yes, but let them know that when indexing the last letter gets excluded. ex: a = ajit a[1:3] - when you print this it will give ji not jit because indexing excludes the last letter.
@@Munchkie ok Got it.
Thanks for the nots ❤️
I am an idiot. You already said this.
Legends watching in 2024 😂😂😂
Me 🤣🤣🤣😅
Me too
Me too
@@DeekshaDeeksha-se1pyfor what purpose are you learning
Never knew python is enjoyable this way. Thanks for it.
hope it continues
😍
i swear down
Really osm
It all depends on the teacher.... Everything is enjoyable
First time ever in my life listening carefully with full interest on one pgming language lecture...the same lecture on these topics by my faculty made me sleep so hard😝...great effort and concept is easily understandable...Thanks a lot sir.
So True!!!!!! LOL
Is it helpful comparing to other videos?
You're a GOD'S GIFT to us!! ♥️ Couldn't imagine to learn something with such fun, thank you Navin 💯
I have been studying python for about 3-4 months now. Your enthusiasm is contagious. I had so much fun learning this😁
Wanted to learn Python from last 2 years but unable to continue interest and now you're here 😍
Loving the sessions
Print (100*respect)
Love the way you tech nivin sir..
Learning during corona holiday 😁
NameError: name 'respect' is not defined
bro watch more carefully :P
@@rokkababa8448 shitxD
@@rokkababa8448 print(r'100 * "respect"')
lol me too
keep going but 100 * 'respect'
most energetic teacher on CZcams.. tbh one of the best teachers I have ever seen in my life.
I never thought python so easy programming language by listening this awesome lecture...
Thank you so much Navin Reddy Sir...
Output -
Telusko
Rocks
Since at start of the string you've mentioned r which stands for raw string, it means that the string will be printed as it is(in a raw state) no special meanings will be considered.
Just started this because I was frustated with Java courses. This is SOOOOOOOO much simpler! thank you sir!!
The enthusiasm with which u r teaching is great and your teaching skills is fabulous .
Seriously lucky to have a teacher like you
This series of videos are just too easy to follow. I am elated to come across them. Thank you, Mr Navin.
name='navin reddy'
respect='nosire'
print('thank you ' +name+' '+respect[2:5])
SyntexError: invalid charactor in identifier.
print('thank you '+name+' '+respect[2:5])
thank you navin reddy sir
i m not getting any error.
name='Navin Reddy'
Honour='Nosire'
print ("Thank you" + name + Honour [2:5])
it was simple to getting output
try this one
name =' navin reddy'
respect = ' nisire'
print('hello'+name+respect)
Thanks Navin for your wonderful series. Your way of explaining thse concepts is exemplary. Easy and to-the-point.
I used to teach C lanuage 20 years ago, and I like the way you are doing this very much.
Thanks for taking the time to simplify this. Bless you
for the first time I am having fun with learning programming. thank you for making this much effort for free, you have my respect.
Wow YOU make it sound so simple and easy. i always had inhibition about coding in "Python" and pursued it as a Rocket Science! but with the help of these videos I think I'll soon be there.. Kudos :)
I have been following your tutorials from a very long time when you had 50-60k subscribers. Your content was good then and now of course.
But the best part is you have also evolved as a creator in terms of your appearance, video quality & viewer's engagement.
Thank you for educating us.
Keep doing! Keep motivating (Y)
I am really enjoying Python series and
also like the new video format
Your explanations are very easy to understand and anyone who is struggling to learn programming before can learn easily just by watching your sessions
Thank you Navin I was really hopeless in learning python...
But watching your video makes me feel it's a piece of cake.. thank you so much for your efforts❤
First time I heard somebody explaining variable in such simple way.
Regards
Thanks Sir...I always scared from coding despite being a computer science graduate. But your videos are awesome and very easy to comprehend. Please keep up the good work that you are doing. Thanks!
Your videos great sir.
for the first ever saw such a great tech teacher in my life. The best thing about your video lectures is that when questions come in to my mind, it clears automatically as i continue watching your video,sir .
you are best ,sir.
Thanks for sharing YOUR KNOWLEDGE WITH US IN such an interesting way.
Thank You... Navin Garu for teaching Python in a simpler way with more clarity.
Output for quiz question:
Telusko
Rocks
Thank you sir for clear explanation,, after executing codes you are saying wow its working☺,that's good sir. You are changing the way of learning, keep going on navin sir. I am suggesting all my friend's to watch your channel
This answer is almost true. r before the string implies that the string has to be printed as raw string. So the correct answer would be. Telusko Rocks
Love python from a such a talented and interactive teacher sir
You are just an awesome teacher, you explain it with such a clarity and make it so easy.
Thanks a lotttt.
Hai Bro, I am 43 yrs old and now trying to learn Python, I am impressed by the way you created these videos which are very interesting and helpful to the viewers, keep going keep roks and God Bless You...
Sir the way of your teaching really inspired me to learn more
I like his INTROs in which he's like "hello there ALIENS!!!!"
Right 😁😁😁😁
But why are we aliens??just because we are learning Python!! 😅
@@dynamisarian6576 Plot twist: Navin Sir is from another planet.
@@nitinchauhan365 woww..it could be👌🏻😁
Alien means far from... Means either another state, country or planet. What ever it is.
Alien means foreigner
@@mveera5441 very good
As a lecturer you are giving us ultimate.
And really we are respectful every time when we watch your videos
What a energy, i got some interest to learn python now 😊😊
Superb explaination sir,and it is very easy to learn
Thank you so much for making this video 👌👌👌
Excellent way of teaching sir 🙏,requires lot of efforts also time,this is d result of ua Hard work n patience 🙏
You are amazing.... Ur the person making efforts without expecting anything 😊😊
i just love him. such a tutor needs to be in colleges
Very enjoyable teacher, teaching and class
Wow...Very advanced style.... Nicely explained....👍👍👌
Tqsm for keeping the python programs ....
I enjoyed so much by seeing u r vedios...
wow, what an explanation, very clear and easy to understand
Navin thank you, I am new to this and I am enjoying learning python. I like the way you teach. Your explanations are thorough and you keep it very simple. I am glad I came across your channel, and I did subscribe.
Everytime he tells us something new he pretends like he never knew it would come out this way... and that makes him cool !
exactly, thats cool.
@@rekhabansal9065 😁👍
You really know the meaning of speed and understanding,thanks.
Such good lessons.. first time ever I don't have issue with focusing
feelings = " LOVE"
expression = " Great"
print(" Its " , {Feelings} , " to watch your tutorials & its ", {expression})
print(" Its " , feelings , " to watch your tutorials & its ", expression)
this is correct
@@byspandanan7410 you both are wrong.
bro use .format while u use {}
@@lokeshmadiga6215 what is correct, can you please help me printing the exact syntax?
@@mwendeevande3743 i think spandana nandigum is right.
I'm enjoying this class it is very easy and interesting thank you sir 😊😊
Great learning here. from Very basic. Thanks lot!
I am really enjoying learning python just because the way you explain is simply amazing
Telusko
Rocks (This is the answer of quiz)
This is an awesome tutorial and now i am loving python!
This is really a great course and amazingly explained. I really do appreciate your contributions and help for student community. No doubt this is really a great python series. Though this was updated in 2018 and recently there is no new update in this series. Do you have any plan to add more into Python course?
I am really understanding this now. You have a great teaching style. TY and keep up the great work!!!!
Thank you so much for such quality content and for sharing your knowledge with millions around the world and making they dream come true. You are a great man!
much better than code with harry playlists . He is atleast starting this from start not like harry u have started his series from quiet a high level
previously i was not in the mood to learn python, but your videos made me do so
True
Really looks simple when you explain things. Since coming from a non-coding background, this teaching technique method is really easy to understand.
>>> print ('Thanks Navin')
:)
Man ur fabulous as a coach....Im enjoying your sessions.... best part im not getting bored :)
I am an Architect (civil), have absolutely zero programming knowledge or background, and just wanted to make the lockdown break useful.You sir, are an amazing teacher and have actually made python so much fun.Thank you for the effort.Keep up the good work.
Does Learning this language make any difference till now for you???
Nice intro video to variables.
Thank you so much to provide lovely containt. I never thought that I can learn this python without having any technical background
Superb sirr by this so many members rr getting this course freely and can easily understand by u super explanation ........
Sir, In the quiz the output is
'Telusko
Rocks'
Bro i think
Telusko
Rocks
Because
indicates next line
@@darshannt4057 as r is mentioned it will skip the special meaning of
so the above ans is right
@@sayleesurve2708 yup
yes correct answer 'Teisuko
Rocks'
myname= 'Navin Reddy'
len(myname)
11
here what i observed is even the space between Navin and Reddy is counted right so it makes 11 in total .
Thank you so much Sir
Hey naruto I am Itachi... Amaterasu
@@codinghub3759 haha
I think so
Space is counted in len string??
@@Raghav-rai yupp.
Love the quick lessons that keep building!!!
Hi Naven Sir, the videos are just amazing, thanks a lot sir for teaching us in such an amazing way.
This is amazing, I'm really enjoying tutorials.I am a beginner of programming, with these videos i'm sure i will become a programmer
'Telusko
Rocks' i got this output for you last quiz in the video. and i love your teaching method the way you are explaining it s really amazing for an individual who does not have any coding background.
Bro the commas u entered in the first and last so there is an error
I saw all your video till this one and finally you made me sub.
This is jst damnn clear.. Love the you teach and explain.. Thanks for such great efforts sir! 💫
Answer: Telusko
Rocks
Really enjoyed😃
stands for new line !
Rocks will come in a new line
@@iamjoker101 what is that r means? because of r o/p is coming as it is
@@jahnavimiriyala1640 it is a raw line
Using r and
is like using a blanket with a fan...
You have both things and you use one to counter the other...
Awesome explanation sir. Now I am very clear about Python. And it's very interesting too.
Super teaching ...super stuff ...beauty of explaining 😍
I cannot go without leaving comment this is the best video since I started learning python. thanks you a lot .
🤓 Quiz Answer 🤓
Guess the Output
print (r'Telusko
Rocks')
Answer : Telusko
Rocks
That's wrong... The output shoul be: Telusko
Rocks
.... As that '/n ' is used for a new line...
@@raziabegum9618 nah @MILAN BARIYA is right coz that r stands for rawstring watch that 3rd video skip to the 3/4 part
@@raziabegum9618 r makes it rawstring
If you want to your output as it's , please use //in stead of/......now you will get your output as it is... 😄
@@raziabegum9618 MILAN is right the answer is Telusko
Rocks because its a raw string we cant change that
Thak u so much sir
U gave me a goal of my LIFE
What are you doing brother
Sir you are really great. you made all the things so easy. and thanks for making these videos in English. Love from Bangladesh.
thanks sir it is very easy to understand chala baga artam ayindi sir
Ans of the quiz : Telusko
Rocks
Thank you so much sir for teaching python in such an easy way
Bro what are u doing for certificate
I cant believe that i'm still learning new stuff in python after almost 2 years of working with it!!!
simple and clear. thanks!
Bro today was my exam on python and this helped a lot
'DA CHEATING' * 100
@Miss omal You won't understand :)
@Miss omal ma, nothing. He did not study before the exam but he saw this video and he passed in front of his classmates. That's why it's like cheating
I love your classes sir.. so much helpful for a beginner.. thank you so much for taking time to create videos and we will support you all along
Nice sir becouse I am beginner . Starting coding to Python.
U r way of explanation is awesome. 👏👌👍Thank you Mr. Naveen
thanku so much sir for effort without any expecting anything....
Answer to the quiz question
Telusko
Rocks
I know many ppl would have answered correctly but still I felt like answering because I enjoyed learning!! .Your videos have given me a sense of confidence to do programming. Thank you so much 😀💯
print (r"r'Telusko
Rocks'")
@@nareshgupta493 error
Telusko
Rocks
ANSWER OF THE QUIZ QUESTION IS Telusko
Rocks
You are a great man , THANKS FOR TEACHING Python for FREE .
Really you are an. Awesome teacher sir....huge respect ..... although you know everything in python. ...you teach each everything very clearly.......thank you so much sir...👍👍👍
Thank you sir for effective explanation of each function.
You've made python super easy....I'm loving it.
Also do you provide notes, would be really helpful.
Telusko Rocks sir
Good teaching in short time...Awesome....
loving the series especially since I just started watching it ❣❣I have learned so much for just being on the 4 episode of the series, keep up the hard work!!
Hi Sir, your tutorial is very helpful .Thanks
Thanks for the Good work of teaching me Python programming in the simplest way possible.
The Best Python Tutorial one can get! Hat's off Sir..
Telusko
Rocks
"Oh it works"