GH+Python Practice #02 | Text Processing


  1. Functions
  2. Import
  3. Export
  4. Practice
    1. Lists in List to Text
    2. DataTree to Text


  •  <text>[<n>]  –  find<n>th character in <text>
  • len(<text>)  –  find the length of <text>
  • <text to split>.split(<separator>)  –  split <text to split> with <separator>
  • <separator>.join(<list of texts>)  –  join <list of texts> with <separator>
  • <text to search>.find(<character>)  –  find <character> from <text to search> It returns index of character, if it’s not found, it returns “-1”
  • <text to check>.startswith(<prefix>)  –  check if <text to check> starts with <prefix>
  • <text>.(<char to replace>,<replacer>)  –  replace <char to replace> in <text> with <replacer>


Use “Read File” component to import text files.


Use “Panel” component to export text files. Right click “Panel” and select “Stream Contents”, then define file directory and name to save.


Lists in List to Text

DataTree to Text