Python 3 Tutorial for Beginners #7 - String Formatting

preview_player
Показать описание
Hey gang, in this Python 3 tutorial we'll take a look at some basic string formatting techniques, such as f-strings and the .format() method.

----- COURSE LINKS:

---------------------------------------------------------------------------------------------
Other tutorials:

----- NODE.JS TUTORIALS

============== The Net Ninja =====================

================== Social Links ==================

Рекомендации по теме
Комментарии
Автор

this video just saved my life. i has no idea wtf the lecturer was talking about during the entire strings formatting lecture.

Mxdxmspodcast
Автор

This is the clearest Python tutorial presentation I have come across so far and believe me, I have scoured through many. I applaud you good sir.

retinasoup
Автор

This was a really good tutorial, I'm gonna check out your other ones. Thanks!

elenaperez
Автор

The readability of string formatting as a beginner was causing quite the headache, but your explanation of f-string formatting has me wanting to cry tears of joy. Thank you!

jeffreygonzalez
Автор

Hi. I bought a curse in Udemy but I find yours much You explain so well! thank you

silverbell
Автор

I did not know about f'..' style string formatting. Thanks for showing it. Python is cool We need to learn Flask and /or Django! )) Please, continue with Python !

alexpanas
Автор

I love my book didn't explain it sufficiently and you really made it clear for me...Thank you!!

leomichaels
Автор

Very clear and easy explanation, you rock!

MusicMonster
Автор

Epic stuff, gonna need some practice to keep em in mind tho

hike
Автор

You are an incredible teacher. I feel bad about college now.

evrytookem
Автор

I like the .format method myself, but the f strings are pretty cool as well. . You can leave out the positional number, in the format. If you are them in a sequence. But, I may try to get used to the new 3.6 F-strings

jeremybrews
Автор

Thank you very much! Very good tutorial!

kostiantynkarzhanov
Автор

This whole tutorial went over for me really good until the last example. I'm using Geany on my Raspberry Pi and the last example gives a syntax error which points to the last single quote between the last curly brace and the last parenthesis.

apologetic
Автор

print('this dude is awesome. ')

qabsal
Автор

I have python 3.1 and the F-string method doesn't work for me . Any fixes ?

bonniesimon
Автор

Hi! I don't know why, the input(f'text') gives me invalid syntax.

Great videos!

marcoalban
Автор

suppose there is a variable called num1 = 34785.10015 and you want to only print in the console till the 3 significant numbers, so the first 3 digits and the 3 decimal points, so then can you format it to only get 3 significant numbers and 3 decimal points together? Because in here I saw that you can only get either the decimal points by adding the f in it or the digits.

omarjahanzaib
Автор

What's the difference between these and ( "something %s something" %(var) ), and what are the benefits?

wacesferpit
Автор

Hi, Shawn. Loved the tutorial, but I had some issues with Ubuntu. String formatting with f-strings is not supported in Ubuntu 17.04 which uses Python 3.5. However, it is possible to upgrade python3 in Ubuntu. I stumbled across this in my research:


Although this article is a wee bit dated, it still worked flawlessly. I hope the Ubuntu users in your group finds this useful.

Once again, I thank you for your excellent content. And have a great day.

michaelkornblum
Автор

at 10:01 how comes num2 is displayed as 10.2904 when the first four decimal places in the the variable are.2903?

JJ-pufc