- Python Tutorial for Beginners 2: Strings - Working with Textual Data

Python Tutorial for Beginners 2: Strings - Working with Textual Data

In this Python Beginner Tutorial, we will begin learning about the string data type. Strings allow us to work with textual data in Python. We will be going over different ways to format strings, and also a lot of useful string methods. Let's get started.

The code from this video can be found at:...
In this Python Beginner Tutorial, we will begin learning about the string data type. Strings allow us to work with textual data in Python. We will be going over different ways to format strings, and also a lot of useful string methods. Let's get started.

The code from this video can be found at:
https://github.com/CoreyMSchafer/code_snippets/tree/master/Python-Strings

Watch the full Python Beginner Series here:
https://www.youtube.com/playlist?list=PL-osiE80TeTskrapNbzXhwoFUiLCjGgY7

Slicing Video: https://youtu.be/ajrtAuDg3yw
String Formatting Video: https://youtu.be/vTX3IwquFkc


✅ Support My Channel Through Patreon:
https://www.patreon.com/coreyms

✅ Become a Channel Member:
https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel - https://www.youtube.com/c/coreymschafer
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter -
Instagram - https://www.instagram.com/coreymschafer/

#Python

#Python #Python Strings #Python Text #Python Print #Python Variables #Python for Beginners #Absolute Beginners #Python for Absolute Beginners #Python Basics #Getting Started with Python #Python 3.6 #Python 36 #Python 3 #python tutorial #python #strings
right so does it mean it should be print(message[])? - Python Tutorial for Beginners 2: Strings - Working with Textual Data

right so does it mean it should be print(message[])?

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:00:04 - 00:21:12
], [], [:5] or [6:]5. lowercase and uppercase, message.lower() or upper()6. message.count(l) = 37. message.find(l) = 2 (-1 if it doesn't exists)8. message = message.replace('World', 'Universe')9. message = '{}, {}. Welcome!'.format(greeting, name)10. message = f'{greeting}, {name.upper()}. Welcome!'11. dir(name) shows all attributes and methods of that variable12. help(str) shows descriptions of methods or help(str.lower) - Python Tutorial for Beginners 2: Strings - Working with Textual Data

], [], [:5] or [6:]5. lowercase and uppercase, message.lower() or upper()6. message.count(l) = 37. message.find(l) = 2 (-1 if it doesn't exists)8. message = message.replace('World', 'Universe')9. message = '{}, {}. Welcome!'.format(greeting, name)10. message = f'{greeting}, {name.upper()}. Welcome!'11. dir(name) shows all attributes and methods of that variable12. help(str) shows descriptions of methods or help(str.lower)

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:00:05 - 00:21:12
print(message[]) - Python Tutorial for Beginners 2: Strings - Working with Textual Data

print(message[])

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:00:05 - 00:21:12
How did you run your code?! - Python Tutorial for Beginners 2: Strings - Working with Textual Data

How did you run your code?!

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:00:40 - 00:21:12
Time:Progress:5% - Python Tutorial for Beginners 2: Strings - Working with Textual Data

Time:Progress:5%

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:00:42 - 00:21:12
-  printing string variable with print() function - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- printing string variable with print() function

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:01:50 - 00:02:10
-  single quote vs double quote  differences - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- single quote vs double quote differences

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:02:10 - 00:03:56
that was muscle memory - Python Tutorial for Beginners 2: Strings - Working with Textual Data

that was muscle memory

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:02:27 - 00:21:12
-  multiple line string using triple double quotes - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- multiple line string using triple double quotes

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:03:56 - 00:04:30
-  string length in string using len() function - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- string length in string using len() function

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:04:30 - 00:05:16
-  accessing characters in string using square brackets [] - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- accessing characters in string using square brackets []

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:05:16 - 00:08:52
doesnt work when you try to figure out the plot of the letters number - Python Tutorial for Beginners 2: Strings - Working with Textual Data

doesnt work when you try to figure out the plot of the letters number

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:05:33 - 00:21:12
At  , print(message[0:5]) does include space also. If start from 0 h ,1 e ,2 l ,3 l ,4 o ,5 space - Python Tutorial for Beginners 2: Strings - Working with Textual Data

At , print(message[0:5]) does include space also. If start from 0 h ,1 e ,2 l ,3 l ,4 o ,5 space

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:07:18 - 00:21:12
@ Why does python call them methods? I thought methods were functions that belonged to a class? Why dont they just call them something else?Also can you distinguish whether its a built-in method or a built-in function by the use of periods vs parenthesis? - Python Tutorial for Beginners 2: Strings - Working with Textual Data

@ Why does python call them methods? I thought methods were functions that belonged to a class? Why dont they just call them something else?Also can you distinguish whether its a built-in method or a built-in function by the use of periods vs parenthesis?

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:08:15 - 00:21:12
-  String methods lower() & upper() - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- String methods lower() & upper()

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:08:52 - 00:09:31
Lower and upper - Python Tutorial for Beginners 2: Strings - Working with Textual Data

Lower and upper

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:08:55 - 00:09:30
Count - Python Tutorial for Beginners 2: Strings - Working with Textual Data

Count

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:09:30 - 00:10:08
-  String count() & find() method - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- String count() & find() method

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:09:31 - 00:10:55
Find - Python Tutorial for Beginners 2: Strings - Working with Textual Data

Find

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:10:08 - 00:10:48
Replace - Python Tutorial for Beginners 2: Strings - Working with Textual Data

Replace

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:10:48 - 00:21:12
-  String replace() method - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- String replace() method

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:10:55 - 00:12:47
At - Python Tutorial for Beginners 2: Strings - Working with Textual Data

At

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:11:47 - 00:21:12
you say it returns a new string with  those values  replaced...here 'those' stands for which values...and where are they replaced. - Python Tutorial for Beginners 2: Strings - Working with Textual Data

you say it returns a new string with those values replaced...here 'those' stands for which values...and where are they replaced.

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:11:47 - 00:21:12
-  String concatenation - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- String concatenation

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:12:47 - 00:15:15
fstrings (this is my note, because youtube is not allowing adding note yet). - Python Tutorial for Beginners 2: Strings - Working with Textual Data

fstrings (this is my note, because youtube is not allowing adding note yet).

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:15:06 - 00:21:12
-  String formatting (placeholders and format method) - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- String formatting (placeholders and format method)

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:15:15 - 00:16:35
why not show them the following too? print("%s, %s. Welcome!" %(greeting,name)) - Python Tutorial for Beginners 2: Strings - Working with Textual Data

why not show them the following too? print("%s, %s. Welcome!" %(greeting,name))

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:15:18 - 00:21:12
i learned  in "Python the hard way" book  that we can use %s %d %r or %f it looks like this:print("%s, %s. Welcome!" % (greeting, name))but your way looks more neat actually.thanks 4 video - Python Tutorial for Beginners 2: Strings - Working with Textual Data

i learned in "Python the hard way" book that we can use %s %d %r or %f it looks like this:print("%s, %s. Welcome!" % (greeting, name))but your way looks more neat actually.thanks 4 video

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:15:35 - 00:21:12
-  String formatting using Python 3.6 new f' strings - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- String formatting using Python 3.6 new f' strings

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:16:35 - 00:17:58
F strings start at : - Python Tutorial for Beginners 2: Strings - Working with Textual Data

F strings start at :

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:17:00 - 00:21:12
.  This was on video segment 'ish, when combining multiple string, instead of using .format    Enjoying it so far. - Python Tutorial for Beginners 2: Strings - Working with Textual Data

. This was on video segment 'ish, when combining multiple string, instead of using .format Enjoying it so far.

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:17:30 - 00:21:12
-  Using dir() function to print out all methods and attributes of string - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- Using dir() function to print out all methods and attributes of string

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:17:58 - 00:19:09
at , if I use ".replace" in place of ".upper" , I am getting syntax error. Any suggestions? - Python Tutorial for Beginners 2: Strings - Working with Textual Data

at , if I use ".replace" in place of ".upper" , I am getting syntax error. Any suggestions?

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:17:59 - 00:21:12
-  Using help(str) function to access a lot more info about string methods - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- Using help(str) function to access a lot more info about string methods

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:19:09 - 00:20:47
At  you drag to increase the height of the lower console area (where the script output appears). In the Atom editor, I can't do that. I've followed your previous video on setting up Python in Atom and searched for how to do this, without success. Any hints? - Python Tutorial for Beginners 2: Strings - Working with Textual Data

At you drag to increase the height of the lower console area (where the script output appears). In the Atom editor, I can't do that. I've followed your previous video on setting up Python in Atom and searched for how to do this, without success. Any hints?

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:19:15 - 00:21:12
i love the way you are teaching buddy ❤️ - Python Tutorial for Beginners 2: Strings - Working with Textual Data

i love the way you are teaching buddy ❤️

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:20:20 - 00:21:12
now I do actually feel comfortable, I have found a *very* useful tutorial. Thanks man, that´s really helpful yo - Python Tutorial for Beginners 2: Strings - Working with Textual Data

now I do actually feel comfortable, I have found a *very* useful tutorial. Thanks man, that´s really helpful yo

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:20:20 - 00:21:12
-  Please share, like and subscribe if you've enjoyed the video - Python Tutorial for Beginners 2: Strings - Working with Textual Data

- Please share, like and subscribe if you've enjoyed the video

Python Tutorial for Beginners 2: Strings - Working with Textual Data
2017年05月18日 
00:20:47 - 00:21:12

Corey Schafer

※本サイトに掲載されているチャンネル情報や動画情報はYouTube公式のAPIを使って取得・表示しています。

Timetable

動画タイムテーブル

動画数:236件

how to override existing environment variables. (This is new to me) - Python Tutorial: Securely Manage Passwords and API Keys with DotEnv

how to override existing environment variables. (This is new to me)

Python Tutorial: Securely Manage Passwords and API Keys with DotEnv
2024年04月18日  @JorgeEscobarMX 様 
00:10:42 - 00:16:58
the future spoken is my current present. Unless I'm completely desperate, I'm not hitting reddit or google/stack overflow for most roadblocks. - How to Use ChatGPT as a Powerful Tool for Programming

the future spoken is my current present. Unless I'm completely desperate, I'm not hitting reddit or google/stack overflow for most roadblocks.

How to Use ChatGPT as a Powerful Tool for Programming
2023年05月22日  o k t o b e r 様 
00:12:22 - 00:31:08
Good video as always😉  I remember asking that too lol - How to Use ChatGPT as a Powerful Tool for Programming

Good video as always😉 I remember asking that too lol

How to Use ChatGPT as a Powerful Tool for Programming
2023年05月22日  kami 様 
00:28:19 - 00:31:08
@ - pure gold, pure gold! <3 - How to Use ChatGPT as a Powerful Tool for Programming

@ - pure gold, pure gold! <3

How to Use ChatGPT as a Powerful Tool for Programming
2023年05月22日  ulf gjerdingen 様 
00:28:26 - 00:31:08
You almost had me there haha! ChatGPT can be wrong but it certainly wasn't wrong about those top notch resources! I massively appreciate all the uploads and I hope they keep coming supercharged with Chat GPT. Thanks to you, sentdex, techwithtim and Dennis Ivy I now know how to properly code on python, use git for version control and build a functional website. - How to Use ChatGPT as a Powerful Tool for Programming

You almost had me there haha! ChatGPT can be wrong but it certainly wasn't wrong about those top notch resources! I massively appreciate all the uploads and I hope they keep coming supercharged with Chat GPT. Thanks to you, sentdex, techwithtim and Dennis Ivy I now know how to properly code on python, use git for version control and build a functional website.

How to Use ChatGPT as a Powerful Tool for Programming
2023年05月22日  Uj Vag 様 
00:28:42 - 00:31:08
and it's  am here (south east asia), and idk why I'm watching a python tutorial rather than sleeping 😂 - Python Tutorial: Simulate the Powerball Lottery Using Python

and it's am here (south east asia), and idk why I'm watching a python tutorial rather than sleeping 😂

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  X 様 
00:02:49 - 00:38:56
… nice… 😂 - Python Tutorial: Simulate the Powerball Lottery Using Python

… nice… 😂

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  Bartosz Turkowyd 様 
00:04:50 - 00:38:56
I've seen every Python video you've made....   first innuendo. 😜 - Python Tutorial: Simulate the Powerball Lottery Using Python

I've seen every Python video you've made.... first innuendo. 😜

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  Martin Beaudry 様 
00:04:52 - 00:38:56
Man it's  am in India I am lucky to be the first one to hear your voice god bless you brother and an awesome teacher. - Python Tutorial: Simulate the Powerball Lottery Using Python

Man it's am in India I am lucky to be the first one to hear your voice god bless you brother and an awesome teacher.

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  Big Samosa 様 
00:12:15 - 00:38:56
# you can also use the built-in pprint module for pretty printing dictionaries ;) - Python Tutorial: Simulate the Powerball Lottery Using Python

# you can also use the built-in pprint module for pretty printing dictionaries ;)

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  Schoenling Wunderbar 様 
00:25:00 - 00:38:56
it would be very interesting to see if there could be a step function where this algorithm can simulate the increases in jackpot winnings. It’s going to be one in 292+ million of a chance that you hit it at all much less multiple times, but the code should be interesting to see. - Python Tutorial: Simulate the Powerball Lottery Using Python

it would be very interesting to see if there could be a step function where this algorithm can simulate the increases in jackpot winnings. It’s going to be one in 292+ million of a chance that you hit it at all much less multiple times, but the code should be interesting to see.

Python Tutorial: Simulate the Powerball Lottery Using Python
2023年01月10日  20 80 様 
00:27:43 - 00:38:56
A OAuth Django video would be awesome!(Applicable to all sorts of OAuth situations, not just the YouTube API.) - Python YouTube API Tutorial: Using OAuth to Access User Accounts

A OAuth Django video would be awesome!(Applicable to all sorts of OAuth situations, not just the YouTube API.)

Python YouTube API Tutorial: Using OAuth to Access User Accounts
2020年09月10日 
00:07:58 - 00:43:21
At  you move the file and see some blurred miniature version of your open folders in the dock. How did you enable that? - Python YouTube API Tutorial: Using OAuth to Access User Accounts

At you move the file and see some blurred miniature version of your open folders in the dock. How did you enable that?

Python YouTube API Tutorial: Using OAuth to Access User Accounts
2020年09月10日 
00:09:58 - 00:43:21
In case you are getting Error 403 ("access_denied The developer hasn’t given you access to this app") go to the OAuth consent screen and under Test Users add your email by clicking on Add Users.  You should be able to grant access after you've added User. - Python YouTube API Tutorial: Using OAuth to Access User Accounts

In case you are getting Error 403 ("access_denied The developer hasn’t given you access to this app") go to the OAuth consent screen and under Test Users add your email by clicking on Add Users. You should be able to grant access after you've added User.

Python YouTube API Tutorial: Using OAuth to Access User Accounts
2020年09月10日 
00:19:36 - 00:43:21
@corey  So why did you add the join function here, when appending the video id to the list its already a list and its working for me when I pass the vid_ids directly - Python YouTube API Tutorial: Calculating the Duration of a Playlist

@corey So why did you add the join function here, when appending the video id to the list its already a list and its working for me when I pass the vid_ids directly

Python YouTube API Tutorial: Calculating the Duration of a Playlist
2020年06月11日 
00:11:24 - 00:37:38
TypeError: expected string or bytes-like object, I am taking this error in , any idea? - Python YouTube API Tutorial: Calculating the Duration of a Playlist

TypeError: expected string or bytes-like object, I am taking this error in , any idea?

Python YouTube API Tutorial: Calculating the Duration of a Playlist
2020年06月11日 
00:18:50 - 00:37:38
(I love that "Whoops that went too well"-moment at  :D) - Python Tutorial: Real World Example - Using Patreon API and Pillow to Automate Image Creation

(I love that "Whoops that went too well"-moment at :D)

Python Tutorial: Real World Example - Using Patreon API and Pillow to Automate Image Creation
2020年05月11日 
00:35:19 - 00:52:33