Syntax Error: can't assign function to call

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darsheva
    New Member
    • Nov 2014
    • 1

    #1

    Syntax Error: can't assign function to call

    Code:
    def STR(a):
        a = str(a)
        
        for i in range(0, len(a) - 1, 2):
                print(chr(int(a[i:i+2]))),
    
    STR(7269767679) = "HELLO"
    
    
    a = 0
    b = 22443938263631876368983
    n = 928669833265826932708591
    
    C = e * M 
    M = d * C
    e = 141597355687225811174313
    d = 87441340171043308346177
    C = (236857987845294655469221, 12418605208975891779391)
    # STR(M.x) + STR(M.y) = ?
    -----------------------------
    end of code
    -----------------------------
    This is what it is having a problem with
    Can anybody help?

    STR(7269767679) = "HELLO"
    Last edited by bvdet; Nov 4 '14, 03:20 AM. Reason: Add code tags
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    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?

    Comment

    Working...