0
text = open(name + ".txt", "w")  

text.write(con_person + "\n" + con_key_words_list+ "\n" + con_person_rand + "\n" + con_person_rev_rand + "\n" + con_person_up_rand + "\n" + con_person_up_rev_rand + "\n" + con_key_words_list_rand + "\n" + con_key_words_list_rev_rand + "\n" + con_per_per + "\n" + con_per_perrev + "\n" + con_per_perup + "\n" + con_per_kw + "\n" + con_per_kwr + "\n" + con_per_brith02 + "\n" + con_per_brith04 + "\n" + con_per_brith06 + "\n" + con_per_brith68 + "\n" + con_per_rev_brith02 + "\n" + con_per_rev_brith04 + "\n" + con_per_rev_brith06 + "\n" + con_per_rev_brith68 + "\n" con_kw_per + "\n" + con_kw_per_rev + "\n" + con_kw_per_up + "\n" + con_kw_per_up_rev + "\n" + con_kw_kw + "\n" + con_kw_kwr + "\n" + con_kw_brith02 + "\n" + con_kw_brith04 + "\n" + con_kw_brith06 + "\n" + con_kw_brith68 + "\n" + con_kwr_kwr + "\n" + con_kwr_kw + "\n" + con_kwr_brith02 + "\n" + con_kwr_brith04 + "\n" + con_kwr_brith06 + "\n" + con_kwr_brith68)

text.close()

E0001:invalid syntax (, line 259) I don't see anything wrong in this line please help.

3
  • 3
    Please add your full code Commented Jun 25, 2018 at 10:26
  • Code is too long for display. Commented Jun 25, 2018 at 10:39
  • A hint for finding syntax errors in really long lines: break it up in many lines. Then the error message will point at the smaller part where the error is. Commented Jun 25, 2018 at 11:15

1 Answer 1

5
con_per_rev_brith68 + "\n" con_kw_per + "\n" +

to

con_per_rev_brith68 + "\n" + con_kw_per + "\n" +

When writing your code in long lines it makes it hard to catch things like this aswell

Ex:

    con_per_rev_brith04 + "\n" + 
    con_per_rev_brith06 + "\n" + 
    con_per_rev_brith68 + "\n" 
    con_kw_per + "\n" + 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.