Python Tutorial: str() vs repr()

Corey Schafer November 9, 2015
Video Thumbnail
Corey Schafer Logo

Corey Schafer

View Channel

About

Welcome to my Channel. This channel is focused on creating tutorials and walkthroughs for software developers, programmers, and engineers. We cover topics for all different skill levels, so whether you are a beginner or have many years of experience, this channel will have something for you. We've already released a wide variety of videos on topics that include: Python, Git, Development Environments, Terminal Commands, SQL, Programming Terms, JavaScript, Computer Science Fundamentals, and plenty of other tips and tricks which will help you in your career. If you enjoy these videos and would like to support my channel, I would greatly appreciate any assistance through my Patreon account: https://www.patreon.com/coreyms You can find me on: My website - http://coreyms.com/ Facebook - https://www.facebook.com/CoreyMSchafer Twitter - https://twitter.com/CoreyMSchafer Google Plus - https://plus.google.com/+CoreySchafer44/posts Tumblr - https://www.tumblr.com/blog/mycms

You May Also Like

Upgrade Your Tech Today

AI-recommended products based on this video

Loading...
FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

(2,806)
$12.99
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month
Loading...
Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

(130)
$12.99
FREE delivery Sat, Jun 14 on your first order
Loading...
FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

(81)
$9.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
DUEDUE for iPhone 12 Case iPhone 12 Pro Case Liquid Silicone Slim Cover with Microfiber Lining Shockproof Protective Case for iPhone 12/12 Pro 6.1 inch Light Purple

DUEDUE for iPhone 12 Case iPhone 12 Pro Case Liquid Silicone Slim Cover with Microfiber Lining Shockproof Protective Case for iPhone 12/12 Pro 6.1 inch Light Purple

(1,577)
$12.99
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

(130)
$12.99
FREE delivery Sat, Jun 14 on your first order
Loading...
iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad

iPhone Charger Fast Charging [Apple MFi Certified] USB C to Lightning Cable 6FT USBC to Lightning Cable Nylon Braided Type C Cord for iPhone 14 13 12 11 Pro Max XR XS X 8 7 6 Plus SE, iPad

(4,036)
$8.99
FREE delivery Sun, Jun 29 on your first order
2K+ bought in past month
Loading...
iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

iPhone Charger [Apple MFi Certified] 3FT, 3Pack USB A to Lightning Cable Braided Fast Charging Apple Cord Compatible with iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad/iPod/AirPods

(5,626)
$17.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

2Pack 10ft iPhone Charger 90 Degree Lightning Cable Right Angle Long USB Charging Cord Compatible with Apple iPhone 14 13 12 11 Pro Max XS XR X 8 7 6 5 Plus iPad iPod

(2,193)
$14.24
FREE delivery Sat, Jun 14 on your first order
400+ bought in past month
Loading...
2 Pack Magnetic Wireless Charger 15W Fast Mag-Safe Charger Stand Compatible with iPhone 16/15/14/13/12 Series Wireless Charging Pad for AirPods 3/2/Pro 2/Pro White Portable Mag Safe Kickstand

2 Pack Magnetic Wireless Charger 15W Fast Mag-Safe Charger Stand Compatible with iPhone 16/15/14/13/12 Series Wireless Charging Pad for AirPods 3/2/Pro 2/Pro White Portable Mag Safe Kickstand

(31)
$24.69
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
DUEDUE for Samsung Galaxy S25 Plus Case Magnetic Samsung S24 Plus Case Clear Compatible with Magsafe Slim Cover with Stand Ring Shockproof Protective Case for Samsung S25 Plus/S24 Plus 6.7 Inch Clear

DUEDUE for Samsung Galaxy S25 Plus Case Magnetic Samsung S24 Plus Case Clear Compatible with Magsafe Slim Cover with Stand Ring Shockproof Protective Case for Samsung S25 Plus/S24 Plus 6.7 Inch Clear

(38)
$17.99
FREE delivery Sat, Jun 14 on your first order
Loading...
RALEAVO for iPhone 16 Case Compatible with MagSafe Strong Magnetic Phone Case Clear Floral Case for Women Girls Slim Hard Back Protective Case for iPhone 16 6.1"(Clear/Lavender)

RALEAVO for iPhone 16 Case Compatible with MagSafe Strong Magnetic Phone Case Clear Floral Case for Women Girls Slim Hard Back Protective Case for iPhone 16 6.1"(Clear/Lavender)

(872)
$15.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Vihibii for Samsung Galaxy S25 Clear Magnetic Case with Stand, Compatible with MagSafe, [Anti Yellowing] Shockproof & Scratch Proof, Transparent Silm Phone Case for Samsung Galaxy S25 6.2" 2025, Clear

Vihibii for Samsung Galaxy S25 Clear Magnetic Case with Stand, Compatible with MagSafe, [Anti Yellowing] Shockproof & Scratch Proof, Transparent Silm Phone Case for Samsung Galaxy S25 6.2" 2025, Clear

(164)
$21.99$19.17
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
ESR for iPhone 16 Pro Max Case, Compatible with MagSafe, Shockproof Military-Grade Protection, Magnetic Phone Case for iPhone 16 Pro Max, Classic Hybrid Case (HaloLock), Clear

ESR for iPhone 16 Pro Max Case, Compatible with MagSafe, Shockproof Military-Grade Protection, Magnetic Phone Case for iPhone 16 Pro Max, Classic Hybrid Case (HaloLock), Clear

(71,292)
$14.44
FREE delivery Sat, Jun 14 on your first order
400+ bought in past month
Loading...
Wireless Charging Case for AirPods Pro 1st / 2nd Gen with Type-C Charging Port, Compatible with AirPod Pro 2nd Generation Replacement Case, with Blue-Tooth Sync Button, No Earbuds

Wireless Charging Case for AirPods Pro 1st / 2nd Gen with Type-C Charging Port, Compatible with AirPod Pro 2nd Generation Replacement Case, with Blue-Tooth Sync Button, No Earbuds

(15)
$42.98
PrimeFREE delivery Sat, Jun 14
Loading...
Cleaner Kit for Airpods Pro 1 2 3 Multi-Function Cleaning Pen with Soft Brush Flocking Sponge for Bluetooth Earphones Case Cleaning Tools White
Best Seller

Cleaner Kit for Airpods Pro 1 2 3 Multi-Function Cleaning Pen with Soft Brush Flocking Sponge for Bluetooth Earphones Case Cleaning Tools White

(9,766)
$9.89
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

(26,678)
$259.99$194.99
FREE delivery Wed, Aug 20
5K+ bought in past month
Loading...
Wireless Charger, 3 in 1 Charging Station, Fast Charging Station Foldable Charging Stand, Wireless Charging Station for Multiple Devices, Compatible with lPhone 17/16/15/14/13 Pro Max Airpods Watch

Wireless Charger, 3 in 1 Charging Station, Fast Charging Station Foldable Charging Stand, Wireless Charging Station for Multiple Devices, Compatible with lPhone 17/16/15/14/13 Pro Max Airpods Watch

(156)
$25.64
FREE delivery Wed, Dec 24 on your first order
3K+ bought in past month
Loading...
Lemorele Docking Station Dual Monitor, 6 in 1 USB C Hub Multiport Adapter w/2 HDMI 4K, 5Gbps USB3.0 & 2 USB2.0, 100W PD Charging - USB C Dock for Laptop Dell/HP/MacBook/Surface - Plug and Play
Best Seller

Lemorele Docking Station Dual Monitor, 6 in 1 USB C Hub Multiport Adapter w/2 HDMI 4K, 5Gbps USB3.0 & 2 USB2.0, 100W PD Charging - USB C Dock for Laptop Dell/HP/MacBook/Surface - Plug and Play

(1,822)
$27.19
Prime
1K+ bought in past month
Loading...
UGREEN USB to USB C Adapter & USB C to USB Adapter Combo 4-Pack, 10Gbps Type-C Converter, Car Charger Compatible with MacBook Pro, iPad Mac mini, iPhone 17/16, Galaxy, PC/Laptop, Hard Drive Enclosure

UGREEN USB to USB C Adapter & USB C to USB Adapter Combo 4-Pack, 10Gbps Type-C Converter, Car Charger Compatible with MacBook Pro, iPad Mac mini, iPhone 17/16, Galaxy, PC/Laptop, Hard Drive Enclosure

(86)
$9.74
Prime
Loading...
USB C Car Charger, 3-Port 67W Super Fast Charging Dual USB-C & USB-A Car Charger Accessories Cigarette Lighter Adapter for iPhone 17 16e 16 15 14 13 12 11 Pro Max, iPad, Galaxy, Pixel, Android Phone

USB C Car Charger, 3-Port 67W Super Fast Charging Dual USB-C & USB-A Car Charger Accessories Cigarette Lighter Adapter for iPhone 17 16e 16 15 14 13 12 11 Pro Max, iPad, Galaxy, Pixel, Android Phone

(217)
$12.59
FREE delivery Sat, Sep 20 on your first order
2K+ bought in past month
Loading...
USB C Car Charger 121W, IDOLCO 2-Port Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging 12V Car Phone Charger Cigarette Lighter Adapter Plug for iPhone 16/15/14 Series, Galaxy S24/MacBook

USB C Car Charger 121W, IDOLCO 2-Port Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging 12V Car Phone Charger Cigarette Lighter Adapter Plug for iPhone 16/15/14 Series, Galaxy S24/MacBook

(45)
$19.99
FREE delivery Tue, Jun 17 on your first order
Loading...
URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

URVNS 240W USB C Car Charger, Super Fast Charging 4-Ports PD3.1 140W/PD3.0 100W PPS 45W QC65W Type-C Car Adapter for MacBook Pro Laptop iPhone 15 14 Max iPad Samsung Galaxy S24/23/22 Pixel etc

(114)
$57.36$49.99
Prime$5.48 delivery Mon, Jun 16
Loading...
Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified

Spigen Case for iPhone 17 Case, Ultra Hybrid MagFit [Anti-Yellowing, Magsafe Compatible] Designed for Apple iPhone 17 Case (2025) - Clear White ClimatePartner certified

(2,190)
$18.99
FREE delivery Sat, Sep 20 on your first order
Loading...
ESR for iPhone 17 Pro Case with Stash Stand, Camera Control, Compatible with MagSafe, Shockproof Military-Grade Protection, Magnetic Phone Case for iPhone 17 Pro, Classic Hybrid Case (HaloLock), Clear

ESR for iPhone 17 Pro Case with Stash Stand, Camera Control, Compatible with MagSafe, Shockproof Military-Grade Protection, Magnetic Phone Case for iPhone 17 Pro, Classic Hybrid Case (HaloLock), Clear

(2)
$24.99
FREE delivery Sat, Sep 20 on your first order
Loading...
GuaGua Magnetic Case for iPhone 7 & iPhone 8 & iPhone SE 2022/2020 [Compatible with Magsafe] Translucent Matte Back Slim Thin Anti- Scratch Shockproof Protective Phone Cases for iPhone 8/7/SE-Black

GuaGua Magnetic Case for iPhone 7 & iPhone 8 & iPhone SE 2022/2020 [Compatible with Magsafe] Translucent Matte Back Slim Thin Anti- Scratch Shockproof Protective Phone Cases for iPhone 8/7/SE-Black

(87)
$12.77
FREE delivery Sat, Sep 20 on your first order
200+ bought in past month
Loading...
ESR for iPhone 16 Pro Max Case, Camera Control Capture Button, Compatible with MagSafe, Shockproof Military-Grade Protection, Phone Case for iPhone 16 Pro Max, Classic Hybrid Case(HaloLock), Clear

ESR for iPhone 16 Pro Max Case, Camera Control Capture Button, Compatible with MagSafe, Shockproof Military-Grade Protection, Phone Case for iPhone 16 Pro Max, Classic Hybrid Case(HaloLock), Clear

(87,497)
$11.99$10.96
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month
Loading...
FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

(2,806)
$12.99
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month
Loading...
Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

(130)
$12.99
FREE delivery Sat, Jun 14 on your first order
Loading...
FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

(81)
$9.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
DUEDUE for iPhone 12 Case iPhone 12 Pro Case Liquid Silicone Slim Cover with Microfiber Lining Shockproof Protective Case for iPhone 12/12 Pro 6.1 inch Light Purple

DUEDUE for iPhone 12 Case iPhone 12 Pro Case Liquid Silicone Slim Cover with Microfiber Lining Shockproof Protective Case for iPhone 12/12 Pro 6.1 inch Light Purple

(1,577)
$12.99
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
Turtle Beach Stealth 600 Wireless Multiplatform Amplified Gaming Headset for Xbox Series X|S, Xbox One, PC, PS5, PS4, Nintendo Switch, & Mobile – Bluetooth, 80-Hr Battery, Noise-Cancelling Mic – Black
Best Seller

Turtle Beach Stealth 600 Wireless Multiplatform Amplified Gaming Headset for Xbox Series X|S, Xbox One, PC, PS5, PS4, Nintendo Switch, & Mobile – Bluetooth, 80-Hr Battery, Noise-Cancelling Mic – Black

(3,680)
$99.96
FREE delivery Tue, Oct 14
800+ bought in past month
Loading...
Turtle Beach Recon 50 Gaming Headset for Nintendo Switch, Xbox Series X|S, Xbox One, PS5, PS4, PlayStation, Mobile, & PC with 3.5mm – Removable Mic, 40mm Speakers – Red/Blue

Turtle Beach Recon 50 Gaming Headset for Nintendo Switch, Xbox Series X|S, Xbox One, PS5, PS4, PlayStation, Mobile, & PC with 3.5mm – Removable Mic, 40mm Speakers – Red/Blue

(1,668)
$19.99
FREE delivery Sat, Nov 15 on your first order
400+ bought in past month
Loading...
Logitech G435 Lightspeed and Bluetooth Wireless Gaming Headset - Lightweight Over-Ear Headphones, Built-in mics, 18h Battery, Compatible with Dolby Atmos, PC, Mobile - Black

Logitech G435 Lightspeed and Bluetooth Wireless Gaming Headset - Lightweight Over-Ear Headphones, Built-in mics, 18h Battery, Compatible with Dolby Atmos, PC, Mobile - Black

(14,873)
$49.99$39.99
FREE delivery Thu, Aug 21
400+ bought in past month
Loading...
NEW SteelSeries Arctis Nova 3 Multi-Platform Gaming Headset - Signature Arctis Sound - ClearCast Gen 2 Mic - PC, PS5/PS4, Xbox Series X|S, Switch, Mobile

NEW SteelSeries Arctis Nova 3 Multi-Platform Gaming Headset - Signature Arctis Sound - ClearCast Gen 2 Mic - PC, PS5/PS4, Xbox Series X|S, Switch, Mobile

(9,500)
$99.98$67.37
PrimeFREE delivery Sat, Jun 14
100+ bought in past month
Loading...
FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

FNTCASE for iPhone 12 Pro Case: iPhone Magnetic Military Grade Drop Protection Clear Cell Phone Case - Rugged Durable Shockproof Anti Yellowing Slim Cases for iPhone 12 Pro (Clear)

(81)
$9.99
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
for Magsafe Car Mount【20 Strong Magnets 】Magnetic Phone Holder for Car Phone Holder Mount Dash【360°】Cell Phone Mount for Car Accessories,Car Mount for iPhone 16 Pro Max 15 14 13 12 Plus MagSafe Cases

for Magsafe Car Mount【20 Strong Magnets 】Magnetic Phone Holder for Car Phone Holder Mount Dash【360°】Cell Phone Mount for Car Accessories,Car Mount for iPhone 16 Pro Max 15 14 13 12 Plus MagSafe Cases

(11,563)
$16.98
FREE delivery Tue, Jun 17 on your first order
3K+ bought in past month
Loading...
FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

FNTCASE for iPhone 12 Clear Case: for iPhone 12 Pro Case Magnetic Military Grade Drop Protection Anti Yellowing Cell Phone Cover - Rugged Durable Shockproof Protective Bumper (Clear) Global Recycled Standard

(2,806)
$12.99
FREE delivery Sat, Sep 20 on your first order
500+ bought in past month
Loading...
Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

Phone Case for iPhone 12 Pro Max Case Compatible with MagSafe, YUANDMI Case for iPhone 12 Pro Max Magnetic Slim Thin Translucent Matte Back Shockproof Anti-Yellow Protective Cover Case Black

(130)
$12.99
FREE delivery Sat, Jun 14 on your first order