Python Tutorials - Anagrams | Program To Check Given Two Strings Are Anagram or Not

Поделиться
HTML-код
  • Опубликовано: 21 сен 2024
  • In this Python Pattern programming video tutorial you will learn about Anagrams in detail.
    An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
    To Check the given two strings are anagrams or not we need to sort the given strings first, then we need to compare that, if it matches then given strings are anagram or else it is not.
    sorted() :
    • Python Tutorials - Sor...
    #Python #PythonProgramming
    For more free tutorials on computer programming
    / amulsacademy
    / amulsacademy

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

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

    this channel is awesome! please bring videos of tough leetcode problems.

  • @nagendravarma8495
    @nagendravarma8495 5 лет назад +8

    I always luv to tel this I love yua voice ....

  • @AshokKumar-mk1nr
    @AshokKumar-mk1nr 4 года назад +3

    Really useful your videos and hats off for your effort... I shared to my friends, every one appreciate me.. that's for your effort.. really superb, kindly continue this work

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

    Thank u so much 😍....Khup chhan explain karun sangital ahe tumhi ,I am going to watch your all videos

  • @harik1999
    @harik1999 5 лет назад +3

    Very nice program and easy to understand!!

  • @naveenreddy8955
    @naveenreddy8955 3 года назад +2

    Thank you so much your explanation of concepts really helped me

  • @CentboyMidnight
    @CentboyMidnight 5 лет назад +1

    example with python 3.8
    print('anagram' if len(str1:=input('str: ')) == len(str2:=input('str: ')) and sorted(str1) == sorted(str2) else 'not anagram')

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

    What a explanation..! simply superb.

  • @sankardaya
    @sankardaya 5 лет назад +3

    Can you please write programs related to simple applications like calculator, forms etc..

  • @rki7068
    @rki7068 8 месяцев назад

    From what i can tell, this program only checks to see if the two strings have the same letters but does not check to see if both are actually words/phrases

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

    Thnx u so much u r really a great teacher love you 🙏

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

    hi madam i got one question in interview .(input is logva but output shoud be volga please explaine )

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

      Full question please :)

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

      @@AmulsAcademy codeforces.com/problemset/problem/746/B this is the link of questions

    • @ShivamSharma-py8wn
      @ShivamSharma-py8wn 4 года назад +1

      @@sivakrishna9083 bro just sort the string in reverse order

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

    Write the program Abc but aA=b and b=c and c=d how will write please help me because there is no d in input

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

    What's the difference between sorted function and sort.str1 I thought you can sort by using sort.str1

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

      Yes but sort method modify the list in place, it sorts original list.
      In sorted, it will return new list.
      :)

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

    Very helpful and clever

  • @950886994
    @950886994 5 лет назад +6

    Beautiful voice...

  • @dasrahul505
    @dasrahul505 5 лет назад

    please upload videos on python pyplot.....from its basics

  • @haridupakuntla9337
    @haridupakuntla9337 5 лет назад +1

    Can you make a video about pronic number

    • @AmulsAcademy
      @AmulsAcademy  5 лет назад

      Yes i can and i will make it soon :)

  • @bhattibhumit992
    @bhattibhumit992 11 месяцев назад

    Check length also if it is not same than not anagram

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

    Love your stuff.

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

    Can you please write a program to find the anagrams in a text file and returning the anagrams to a list? Please!!

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

    thank you very much !!

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

    Hi mam
    Please try to explain code for possible Anagrams for a given string .Example :bcda what are the possible Anagrams

    • @changing-hour
      @changing-hour Год назад

      Take the length of string then take factorial of that length

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

    any way to do this by recursion?

  • @mareboinaravi5272
    @mareboinaravi5272 5 лет назад +1

    Best video..

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

    Can you pls tell program on pangrams

  • @223_sayyidahlubukhwakhdati6
    @223_sayyidahlubukhwakhdati6 2 года назад

    Terima kasih🙏🏻

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

    Helpful 😍

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

    01:28 If you are bad, i am your dad.
    So Mr. Dad's son is Mr. Bad.

  • @gayathri-8-i6s
    @gayathri-8-i6s 3 года назад +1

    How to check this with multiple strings,sisy

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

      First take all inputs, then reverse the string and store it another variable lastly compare the input with reversed string 😊

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

    Sorted is not the function of strings it is function of list
    How can we check this without converting list.

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

      sort is a list method, you can use sorted on iterables and string is an iterable 😊

  • @shubhamku044
    @shubhamku044 5 лет назад

    How to create python package????

  • @sumanasriudumula6817
    @sumanasriudumula6817 5 лет назад +1

    How to return all possible anagrams for a given string in python ?
    Please explain

    • @mandeepubhi4744
      @mandeepubhi4744 5 лет назад

      Maybe You would have to use random function.

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

    Can we use sort instead of sorted?

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

      sort is a list method, we can use that only with list.
      you can convert the string to list then you can use sort().
      :)

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

      @@AmulsAcademy tq 😊