2

I am trying to read a text file in jupyter notebook and fetch the unique words in the file.

I am reading that file as a list and then trying to apply lower case on it. But the .lower() function doesn't work with a list. Please help with the same.

xlm
  • 6,854
  • 14
  • 53
  • 55
Naveen Kumar
  • 33
  • 1
  • 1
  • 6

1 Answers1

7

With a list of values in val you can do this:

valsLower = [item.lower() for item in vals]
Amorpheuses
  • 1,403
  • 1
  • 9
  • 13