title: Save a result of printSchema() function to variable in Pyspark?
body: <p>I'm using the <code>printSchema</code> function to infer schema of Json file. I want to save the result of this function call in a variable to parse it line by line so that I can  extract a structure of a schema and convert it in a DDL schema for creating a table in hive.</p>
  
  <p>How can this be done?</p>