Advertisement
PaulCastellano

prob

Jul 28th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. I try to write in .txt file some things from my database,but i have problems.
  2.  
  3. I use this:
  4. f.write('{0} {1} {2}{3}{2}'.format('#define',response[1],'"',response[2]))
  5.  
  6.  
  7. I get this in my .txt file:
  8. http://prntscr.com/kc2mp4
  9.  
  10. #define need to be on start every line,but see how it's in picture..
  11.  
  12.  
  13.  
  14.  
  15. If I do this: (I'm add \n on end
  16. f.write('{0} {1} {2}{3}{2}{4}'.format('#define',response[1],'"',response[2],'\n'))
  17. I will get this
  18. http://prntscr.com/kc2ned
  19.  
  20. Now #define is on start every line,but all need to be in one line..(Example: http://prntscr.com/kc2nli This in red need to be one line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement