How to Work with 'Text'? (Python Strings)? #16

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 51

  • @programizstudios
    @programizstudios  2 года назад +1

    🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges.
    Try Programiz PRO: bit.ly/right-python

  • @Navin2911
    @Navin2911 4 года назад +21

    I would thoroughly recommend this series of lectures to all newbies. Its a great foundation. Thank and well done, Punit and the Programiz team.

  • @hema_varsh5814
    @hema_varsh5814 3 года назад +6

    I had a great job in your all vedios ...I used to try the practice problems given by you every day ...It is perfectly useful .actually i am beginner from biology group ..But after watching programiz vedio i got a great ideas ...Keep teaching sir ..I'm doing a great job ✌✨

  • @mehulkumawat8002
    @mehulkumawat8002 4 года назад +2

    thanks sir for creating this wonderful python course

  • @akshedcentre8887
    @akshedcentre8887 2 года назад

    Aapka samzana ka Tarika sabse alag hai maine bahut bahut channel ki video dekhi hai lekin simple Trikha aap ka hi hai

  • @puchakayalasuresh5667
    @puchakayalasuresh5667 3 года назад

    ur communication skills are super sir mind blowing explanation

  • @kirancp4758
    @kirancp4758 2 года назад +2

    Can you please clarify on why the answer is 7?( at 12.03 minutes)

  • @nayanaprakash6815
    @nayanaprakash6815 4 года назад

    We can't change a string as mentioned in 6:08 but how come the same rule doesn't apply when using String Methods in 10:45?

    • @programizstudios
      @programizstudios  4 года назад +6

      When we use string methods like this:
      text = "I like Python 3"
      result = text.lower()
      print(result)
      The text.lower() will create a new string and it is assigned the result variable. However, the text string will be unmodified.

    • @nayanaprakash6815
      @nayanaprakash6815 4 года назад

      @@programizstudios Ah! makes sense. Tysm :)

  • @pro.empire
    @pro.empire Год назад

    How would you find the frequency on "Python Strings"

  • @ugabuga4456
    @ugabuga4456 4 года назад

    I have 2 string exercises which are making me hate programming with python from the heart as they are suppose to be as easy as returning 1+1.
    def pairs(txt):
    if len(txt)%2==0:
    right_indexes=list(range(1,len(txt),2))
    print(right_indexes)
    left_indexes=list(range(0, len(txt), 2))
    print(left_indexes)
    right_letters=map(list(txt).__getitem__,right_indexes)
    left_letters=map(list(txt).__getitem__,left_indexes)
    pairs=list(zip(left_letters,right_letters))
    return pairs
    I've ended up creating this list of paired tuples thinking it might help me understand better as I noticed how comparing 2 things next to each other. Because if the number of things is odd at the right side edge, it's not easy for me to know what to do.
    But it's not helping me to solve these very simple problems as I have no idea how to implement a for or while loop from pairs [(A,B),(B,C),(A,B),(C,C),(C,D)] for these 2 exercises:
    1)Make a function that removes letters that are alone. Like if you have like ABBCABCCCD it would return BBCCC
    2)Make another function which does the opposite turning like ABBCABCCC returns ACABD removing duplicates alight together (not just all).
    my brain only works to turn the whole thing into a set... ;____; When things are like this and you truly have to understand loops.... plus conversion as one is suppose to input a string and output should be a string.... I really feel like I'm the dumbest person alife
    Please help me solve these.

  • @gamez1
    @gamez1 3 года назад

    6:30 and 12:42 contradiction?

  • @sirisiri5830
    @sirisiri5830 4 года назад

    Sir in quiz the answer for Q2 is o, your answer is d in git but negative index starts with last character e (-1), d(-2), 0(-3)

  • @girisankargr6896
    @girisankargr6896 4 года назад

    Hi i have a query please do respond.....How can we capitalize a letter from a text...like in python i want to make Y as upper case....How can i do that?

  • @waltg6216
    @waltg6216 4 года назад

    Nice work, thank you!

  • @mycha0
    @mycha0 4 года назад +2

    Please someone explain this code. I'd like to know why there is f without curly braces:
    print(f"Hello
    World!")

    • @programizstudios
      @programizstudios  4 года назад +5

      This code print(f"Hello
      World!") is equivalent to print("Hello
      World") for this case. The f-string is used for formatting string. For example,
      You can replace
      var1 = 5
      var2 = 10
      print("var1 =", var1, "var2 =", var2)
      with
      var1 = 5
      var2 = 10
      print(f"var1 = {var1} var2 = {var2}")
      If you want to learn more, search "python f-strings" on Google.

    • @mycha0
      @mycha0 4 года назад +1

      @@programizstudios Many thanks appreciate it

  • @basharmufaq
    @basharmufaq 3 года назад

    Greetings sir. I really love your videos . I am trying to go for the entry level PCEP python certification. How many of your videos would cover for the material of that test ? if anyone knows the answer then please comment here.

  • @georg101
    @georg101 4 года назад

    Good as always

  • @jackburtjr5057
    @jackburtjr5057 4 года назад

    I have a file. I split() lines of the file using 4 variables. Then, append to the list. What is used to add an instance variable to the list, so I have 5 variables? That I have to append data to, from a function that used data from the file to determine percents?

  • @harish0000
    @harish0000 4 года назад

    Please also alow us to save our code in python compiler which is on your site

  • @gauravgarg5597
    @gauravgarg5597 3 года назад +7

    compliment = " you are very good teacher, i like the way the topics of this series are structured "
    print (compliment.replace("you are","Punit is"))
    hahaha

  • @sandipansarkar9211
    @sandipansarkar9211 3 года назад

    great explanation

  • @NehaGupta-if7se
    @NehaGupta-if7se Год назад

    "He said,\"what\'s there?\"""" -----> He said,"what's there?"........ why so Sir?, Although i took extra 3 quotes but still giving me the right statement

  • @oyevicuu
    @oyevicuu 3 года назад +1

    if you dislike the video
    u will get curse that you will not be able to learn python

  • @harshjain9209
    @harshjain9209 3 года назад

    Is your app free of cost

  • @PRAVEENKUMAR-wg1go
    @PRAVEENKUMAR-wg1go 3 года назад

    What is that git hub?

    • @AnimeFusionHub25
      @AnimeFusionHub25 Год назад

      its a place where you can share code with others

  • @joyceadhiambo9977
    @joyceadhiambo9977 2 года назад +1

    1. k
    2. o
    3. Talk is cheap,Show me the program

  • @jancyranip3625
    @jancyranip3625 Год назад

    1k
    2k
    3 tolk os cheap, show me the program

  • @vatsalranghar9708
    @vatsalranghar9708 3 года назад +1

    Answer:-
    1. k
    2. d
    3. Talk is cheap.Show me the program.

  • @EmereEmmanuel
    @EmereEmmanuel 3 месяца назад

    answers to quiz
    1. k
    2. o
    3. talk is cheap.show me your program

  • @swarnaakshayastudio
    @swarnaakshayastudio Год назад

    1. k
    2. e
    3. Talk is cheap, Show me the program.
    This is the answer

  • @harshitx1.0
    @harshitx1.0 3 года назад

    Sup 😍

  • @lakshanj.kumara7648
    @lakshanj.kumara7648 Год назад

    1. k
    2. d
    3. Talk is cheap. Show me the program.
    >

  • @sunnyraut3243
    @sunnyraut3243 3 года назад +1

    1. k
    2. d
    3. Talk is cheap. Show me the program.

    • @oyevicuu
      @oyevicuu 3 года назад

      lol

    • @oyevicuu
      @oyevicuu 3 года назад

      his explanation is so good

    • @sunnyraut3243
      @sunnyraut3243 3 года назад

      @@oyevicuu bhai mein exercise ke answers de raha hu

    • @ntejaswi7708
      @ntejaswi7708 3 года назад

      How d?

    • @mr_gaider6174
      @mr_gaider6174 2 года назад

      @@ntejaswi7708
      -1 " . "
      -2 " e "
      -3 " d "
      because you can't have -0

  • @oyevicuu
    @oyevicuu 3 года назад

    Greetings sir. I really love your videos . I am trying to go for the entry level PCEP python certification. How many of your videos would cover for the material of that test ? if anyone knows the answer then please comment here.

  • @gamingvicky1114
    @gamingvicky1114 3 года назад +3

    1.k
    2.0
    3.Talk is cheap.show me the program.

  • @sureshvarthya2250
    @sureshvarthya2250 2 года назад

    1.k
    2.d
    3.Talk is cheap. Show me the program.