Python Forum
Help with finding vowels
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with finding vowels
#2
You need to have an expression on each side of the or (see here for details)

Also, you should loop over fin directly:

def print_two_words():
    for line in open(r'\\scrabble\words.txt'):
        if get_vowels(line.strip()):
            print(word)
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Help with finding vowels - by nlord7 - Feb-27-2019, 03:49 AM
RE: Help with finding vowels - by ichabod801 - Feb-27-2019, 04:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug How to print only vowels from an input? PP9044 8 7,911 Feb-26-2021, 04:02 PM
Last Post: Serafim
  Counting Vowels in Python sapphosvoice 1 3,459 May-05-2020, 04:24 AM
Last Post: buran
  Return not vowels list erfanakbari1 2 2,814 Mar-26-2019, 11:37 AM
Last Post: perfringo
  Functions to remove vowels and extra blanks RiceGum 10 6,103 Nov-17-2017, 05:40 PM
Last Post: heiner55
  Print the index of the vowels in a string MeeranRizvi 4 14,949 Dec-29-2016, 02:43 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020