By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,816 Members | 2,151 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,816 IT Pros & Developers. It's quick & easy.

Syntax Error: can't assign function to call

P: 1
Expand|Select|Wrap|Line Numbers
  1. def STR(a):
  2.     a = str(a)
  3.  
  4.     for i in range(0, len(a) - 1, 2):
  5.             print(chr(int(a[i:i+2]))),
  6.  
  7. STR(7269767679) = "HELLO"
  8.  
  9.  
  10. a = 0
  11. b = 22443938263631876368983
  12. n = 928669833265826932708591
  13.  
  14. C = e * M 
  15. M = d * C
  16. e = 141597355687225811174313
  17. d = 87441340171043308346177
  18. C = (236857987845294655469221, 12418605208975891779391)
  19. # STR(M.x) + STR(M.y) = ?
-----------------------------
end of code
-----------------------------
This is what it is having a problem with
Can anybody help?

STR(7269767679) = "HELLO"
Nov 1 '14 #1
Share this Question
Share on Google+
1 Reply


bvdet
Expert Mod 2.5K+
P: 2,851
As the error message states, you cannot assign the string "HELLO" to a function call. The function returns something (or None), so you would assign the result to an identifier. What are you trying to do?
Nov 4 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.