Create A List Out Of File Contents With Item Per Line In Python

The aim of this playbook🏁 is to extract list of clients I need to upgrade from clients.txt file — as a part of the script that changes the version of the component within Consul.

1. instructions

  • 2 new string-object methods to memorize
  1. <file>.readlines() reads lines from a file and passes them into a list
  2. <str>.string() strips the string from special character such as \n

2. sources