What is \n (backslash n)? Newline and Multiline Explained (with Python).

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 24

  • @Duxies
    @Duxies ปีที่แล้ว +6

    Why didn't my teacher just say that!?
    I'm honestly learning more by watching video's like this one on youtube, made by enthusiasts like yourself (rip my college tuition)
    Thank you for well expained tour, sir!

    • @Electriangle
      @Electriangle  ปีที่แล้ว +3

      I appreciate it 😃. Lol, I've been there where professors can make things harder than they need to be. Glad this helped.

    • @raejiisa4948
      @raejiisa4948 7 หลายเดือนก่อน +1

      I'm also learning from a college class and found this channel's videos. Saved and subscribed. ❤

  • @lyrikalinyoswiminpoo
    @lyrikalinyoswiminpoo ปีที่แล้ว +1

    Very good. You deserve a lot more subs!

  • @skiivee857
    @skiivee857 7 หลายเดือนก่อน

    simple, to the point and well said! you truly deserve more recognition!

  • @Kamana-Diti27794
    @Kamana-Diti27794 ปีที่แล้ว +2

    nice.
    good.
    wow.
    amazing

  • @MrMockingbird1313
    @MrMockingbird1313 ปีที่แล้ว +1

    Well said.

  • @roastinsaan2496
    @roastinsaan2496 10 วันที่ผ่านมา

    Thank you....your video helped me ❤❤

  • @Vinodini-Pallavi2639
    @Vinodini-Pallavi2639 ปีที่แล้ว +1

    nice.
    good

  • @AS-wh2ix
    @AS-wh2ix 8 หลายเดือนก่อน +2

    Hi I was wondering how to make space for example let’s say I have got two or three name
    Eric
    John
    Albert
    &
    I want them to be
    Eric
    John
    Albert
    One line space between each name is it
    if so, this means it is a line breaker as in html

    • @Electriangle
      @Electriangle  8 หลายเดือนก่อน +1

      Yes, you can use
      to do that. It is similar in functionality to line breaker in HTML because you can insert multiple of them and it will continue to add new lines. For example, to achieve that spacing you are asking about, you can put two
      next to each other like this:
      print("Eric

      John

      Albert")
      And that will output with additional line spaces as you showed.

  • @leftitbandit956
    @leftitbandit956 ปีที่แล้ว +1

    Hey man, when trying to use escape characters in vscode they're just being outputted as string, how do I fix that ?

    • @Electriangle
      @Electriangle  ปีที่แล้ว

      One of the ways that this can happen is if you are using a double slash "\
      " instead of a single slash "
      ". That will basically "escape the escape" character and print the backslash as a string instead.
      Another way this can happen is if the letter "r" is typed within the argument for the print function call such as:
      print(r"Hello
      World")
      Then the output will be the raw string ----> Hello
      World
      Could one of these be causing your issue?

  • @ravitejak9414
    @ravitejak9414 7 ชั่วโมงที่ผ่านมา

    Thanks man

  • @akshay__sood
    @akshay__sood 2 ปีที่แล้ว +2

    do a CRLF vid with a CSV file?

    • @Electriangle
      @Electriangle  2 ปีที่แล้ว +1

      Thanks for the suggestion. Here is the video: th-cam.com/video/W149ifvprTA/w-d-xo.html

  • @anurch9358
    @anurch9358 7 หลายเดือนก่อน

    Thank you,very basic info.so basic that no one talks about it😢

    • @Electriangle
      @Electriangle  7 หลายเดือนก่อน

      To be honest, I had wondered before making it if it was too basic to even need a video on. But then I realized that things can only become basic info after you have learned it first. So I am glad to hear the feedback that it was helpful!

  • @alkhanli1
    @alkhanli1 หลายเดือนก่อน

    hi how can i print /n in python

    • @Electriangle
      @Electriangle  17 วันที่ผ่านมา

      Are you referring to printing a literal "
      " instead of as the video showed as an escape character? In that situation, you could use a double slash such as "\
      " instead of a single slash as "
      ". That will print a literal backslash character "\" as a string followed by the "n" character. Another way to print "
      " literally in Python is if the letter "r" is typed in the argument for the print function call in front of the string. For example, print(r"Hello
      World"), will output the raw string as "Hello
      World".

    • @alkhanli1
      @alkhanli1 17 วันที่ผ่านมา

      @@Electriangle thanks

  • @tmth881
    @tmth881 5 หลายเดือนก่อน

    Thank You SOOOO MUCH🫡 God Bless

  • @Parthivi-Disha8668
    @Parthivi-Disha8668 ปีที่แล้ว +2

    nice./ngood./nwow./namazing