Hướng dẫn how do you remove a vowel from a sentence in python? - làm thế nào để bạn loại bỏ một nguyên âm khỏi một câu trong python?

Tôi biết có nhiều giải pháp chính xác về chủ đề này nhưng tôi nghĩ sẽ thêm một vài cách thú vị để giải quyết vấn đề này. Nếu bạn đến từ C ++/C# hoặc Java, bạn sẽ có xu hướng sử dụng một cái gì đó như so sánh sau đó hành động bằng cách sử dụng chỉ mục để loại bỏ mục nhập không mong muốn trong vòng lặp. Python có chức năng xóa và del. Hủy bỏ chức năng Sử dụng giá trị và DEL sử dụng chỉ mục. Giải pháp Pythonic nằm trong hàm cuối cùng. Hãy xem làm thế nào chúng ta có thể làm điều đó:

Ở đây chúng tôi đang sử dụng chỉ mục trong chức năng FOR LOOP và DEL rất giống nhau trong C ++:

def remove_vol[str1]:
     #list2 = list1 # this won't work bc list1 is the same as list2 meaning same container#
    list1 = list[str1]
    list2 = list[str1]
    for i in range[len[list1]]:
        if list1[i] in volwes:
            vol = list1[i]
            x = list2.index[vol]
            del list2[x]
    print[list2]

Sử dụng chức năng xóa:

def remove_vol[str1]: 
      list1 = list[str1]
      list2 = list[str1]
      for i in list1:
          if i in volwes:
              list2.remove[i]
      print[list2]

Xây dựng chuỗi mới không chứa các ký tự không mong muốn bằng cách sử dụng các chỉ mục của chúng:

def remove_vol[str1]:  
    list1 = list[str1]
    clean_str = ''
    for i in range[len[list1]]:
        if list1[i] not in volwes:
            clean_str += ''.join[list1[i]]
    print[clean_str]

Tương tự như trong giải pháp ở trên nhưng sử dụng giá trị:

def remove_vol[str1]:
    list1 = list[str1]
    clean_str = ''
    for i in list1:
        if i not in volwes:
            clean_str += ''.join[i]
    print[clean_str]

Làm thế nào bạn nên làm điều đó trong Python? Sử dụng danh sách hiểu! Nó thật đẹp:

def remove_vol[list1]:
    clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
    print[clean_str]

Phương pháp Python Python để lọc các nguyên âm trong một câu trả lời mã chuỗi.

def anti_vowel [c]:.

Báo chí = C ..

  • nguyên âm = ['a', 'e', ​​'i', 'o', 'u'].
  • cho x trong c. thấp hơn[]:.
  • Phương pháp Python Python để lọc các nguyên âm trong một câu trả lời mã chuỗi.

    def anti_vowel [c]:.

    Báo chí = C ..

    nguyên âm = ['a', 'e', ​​'i', 'o', 'u'].

    Examples:  

    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?

    cho x trong c. thấp hơn[]:.

    Implementation:

    C++14

    #include

    Nếu x trong nguyên âm:.

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    2

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    5
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    6
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    7
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    8
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    0
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    2
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    7

    Báo chí = Báo chí. thay thế [x, ""].

    Trả lại báo ..

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    Xem thảo luận

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    9
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    0

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    3
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    4
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    5
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    6

    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    3
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    8

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    Cải thiện bài viết

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    2
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    8

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    1
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    2

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    3
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    5

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    7

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4 #include 0

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    Java

    Lưu bài viết

    Đọc

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4#include 4 #include 9 using0 using1

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    #include 2

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    11

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6using9

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    52
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    53

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    16
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    522____418

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    75
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    56
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    90

    using

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    97

    using

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    27

    Các

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    13
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    11
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    7
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    34

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    13
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    36
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    5

    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    3
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    5

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    13
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    44

    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    3
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    Python3

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    52
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    53

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    16
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    522____418

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    75
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    56
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    90

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    69
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    56
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    84

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    86
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    87

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    75
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    56
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    90

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    91

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    75
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    56
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    94

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    91

    C#

    using

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    97

    using

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    99

    using

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    01

    using

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    03

    #include 4 #include 5

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    06

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    07

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4#include 9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    10

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    Các

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    13
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    37
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    39
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    41

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    13
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    43using6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    45

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    13
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    0
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    1
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    2
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    50

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    51
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    7
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    53

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    13
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    55
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    5
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    57

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    13
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    59

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    51
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    66

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4#include 4 #include 9 using0
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    73

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    77
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    78
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    5

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    81

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    JavaScript

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    85

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    86
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    87

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    90
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    8
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    0
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    2
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    7

    Các

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    13
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    555575

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    0
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    18

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    7
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    23

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    3
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    27

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    34

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    36
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    37
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    38

    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    39
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    40
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    5

    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    42

    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    43

    Đầu ra

    GksfrGks -  Cmptr Scnc Prtl fr Gks

    Độ phức tạp về thời gian: O [n], trong đó n là độ dài của độ phức tạp của không gian chuỗi: O [1] O[n], where n is the length of the string
    Space Complexity: O[1]

    Chúng ta có thể cải thiện giải pháp trên bằng cách sử dụng các biểu thức thông thường. & NBSP;

    Implementation:

    C++

    #include

    using

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    0
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    1

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    2

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    51
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    52
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    6

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    56
    Input : welcome to geeksforgeeks
    Output : wlcm t gksfrgks
    
    Input : what is your name ?
    Output : wht s yr nm ?
    55____56

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    2
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    8

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    1
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    78
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    66

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    68

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4 #include 0

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    Java

    #include 2

    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    74

    #include 2

    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    76

    #include 5

    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    78

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    07

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4#include 9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    10

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    Các

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    13
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    43using6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    45

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    77
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    78
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    04

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    06

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    Python3

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    13
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    0
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    1
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    2
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    50

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    4
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    66

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    75
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    56
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    90

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    86
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    23

    C#

    using

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    97

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4#include 4 #include 9 using0
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    73

    #include 5

    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    78

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4#include 9
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    10

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    Các

    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    13
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    43using6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    45

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4#include 4 #include 9 using0
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    73

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    3

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    77
    def remove_vol[str1]:  
        list1 = list[str1]
        clean_str = ''
        for i in range[len[list1]]:
            if list1[i] not in volwes:
                clean_str += ''.join[list1[i]]
        print[clean_str]
    
    78
    def remove_vol[str1]:
        list1 = list[str1]
        clean_str = ''
        for i in list1:
            if i not in volwes:
                clean_str += ''.join[i]
        print[clean_str]
    
    66

    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    6
    def remove_vol[list1]:
        clean_str = ''.join[[x for x in list1 if x.lower[] not in volwes]]
        print[clean_str]
    
    59

    def remove_vol[str1]: 
          list1 = list[str1]
          list2 = list[str1]
          for i in list1:
              if i in volwes:
                  list2.remove[i]
          print[list2]
    
    4
    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    GksfrGks -  Cmptr Scnc Prtl fr Gks
    0

    Đầu ra

    GksfrGks -  Cmptr Scnc Prtl fr Gks

    Độ phức tạp về thời gian: O [n], trong đó n là độ dài của độ phức tạp của không gian chuỗi: O [1] O[n], where n is the length of the string
    Space Complexity: O[1]

    Chúng ta có thể cải thiện giải pháp trên bằng cách sử dụng các biểu thức thông thường. & NBSP;Pramod Kumar. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to . See your article appearing on the GeeksforGeeks main page and help other Geeks. 


    Làm thế nào để bạn loại bỏ một nguyên âm khỏi một chuỗi?

    Algorithm:..
    Khởi tạo các biến ..
    Chấp nhận đầu vào ..
    Khởi tạo cho vòng lặp ..
    Kiểm tra và xóa các nguyên âm ..
    Lưu trữ chuỗi mà không có nguyên âm bằng cách sử dụng khác cho vòng lặp ..
    Chấm dứt cả hai cho vòng lặp ..
    In chuỗi mà không có nguyên âm ..

    Làm thế nào để bạn xóa các chữ cái khỏi một câu trong Python?

    Dịch [] là một phương thức khác có thể được sử dụng để loại bỏ ký tự khỏi chuỗi trong Python.Dịch [] trả về một chuỗi sau khi xóa các giá trị được truyền trong bảng.Ngoài ra, hãy nhớ rằng để xóa một ký tự khỏi chuỗi bằng cách sử dụng dịch [], bạn phải thay thế nó bằng không và không "". is another method that can be used to remove a character from a string in Python. translate[] returns a string after removing the values passed in the table. Also, remember that to remove a character from a string using translate[] you have to replace it with None and not "" .

    Làm thế nào để bạn lọc ra một nguyên âm trong một python chuỗi?

    Phương pháp Python Python để lọc các nguyên âm trong một câu trả lời mã chuỗi..
    def anti_vowel [c]:.
    Báo chí = C ..
    nguyên âm = ['a', 'e', 'i', 'o', 'u'].
    cho x trong c.thấp hơn[]:.
    Nếu x trong nguyên âm:.
    Báo chí = Báo chí.thay thế [x, ""].
    Trả lại báo ..

    Chủ Đề