Summary
Keywords
Full Transcript
Check out our courses: DevOps Bootcamp: https://go.telusko.com/complete-devops Coupon: TELUSKO10 (10% Discount) Master Java Spring Development : https://go.telusko.com/learn-master Coupon: TELUSKO10 (10% Discount) For More Queries WhatsApp or Call on : +919008963671 website : https://learn.telusko.com/ Java Spring:- https://go.telusko.com/Udemyjavaspring Java:- https://go.telusko.com/udemyteluskojava Spring: https://go.telusko.com/udemyteluskospring Java For Programmers:- https://go.telusko.com/javaProgrammers Python : https://go.telusko.com/udemyteluskopython Git : https://go.telusko.com/udemyteluskogit Docker : https://go.telusko.com/udemyteluskodocker Instagram : https://www.instagram.com/navinreddyofficial/ Linkedin : https://in.linkedin.com/in/navinreddy20 WhatsApp : https://go.telusko.com/whatsapp TELUSKO Android App : https://go.telusko.com/TELUSKOAPP TELUSKO IOS App : https://apple.co/3SsgmU2 Discord : https://discord.gg/D8hWe9BqfF 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 :- https://github.com/navinreddy20/Python- More Learning : Java :- https://bit.ly/3x6rr0N Python :- https://bit.ly/3GRc7JX Django :- https://bit.ly/3MmoJK6 JavaScript :- https://bit.ly/3tiAlHo Node JS :- https://bit.ly/3GT4liq Rest Api :-https://bit.ly/3MjhZwt Servlet :- https://bit.ly/3Q7eA7k Spring Framework :- https://bit.ly/3xi7buh Design Patterns in Java :- https://bit.ly/3MocXiq Docker :- https://bit.ly/3xjWzLA Blockchain Tutorial :- https://bit.ly/3NSbOkc Corda Tutorial:- https://bit.ly/3thbUKa Hyperledger Fabric :- https://bit.ly/38RZCRB NoSQL Tutorial :- https://bit.ly/3aJpRuc Mysql Tutorial :- https://bit.ly/3thpr4L Data Structures using Java :- https://bit.ly/3MuJa7S Git Tutorial :- https://bit.ly/3NXyCPu Donation: PayPal Id : navinreddy20 https://www.telusko.com
