• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to get the first word in a line Python

Resolved: How to get the first word in a line Python

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I am trying to get the first word in a line (e.g. apple, book, chair). I have a long list of French words and their meanings in English:
This list is stored in a csv. I want to get a random French word from this list. Does anybody know how I can do this?
My code(currently):

Answer:

You can use split:

If you have better answer, please add a comment about this, thank you!

python tkinter
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: navigate and redirect not redirecting to path in react router

24/03/2023

Resolved: Time Complexity: Find the number of people who know a secret leetcode 2327

24/03/2023

Resolved: Best way to create 3d matrix of variables in PULP

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.