Ad
  • Custom User Avatar

    OK,thanks for your help.

  • Default User Avatar

    Maybe not, can't free it here at codewars. So I only use it as a reminder to free everything I have allocated. Never use this style in my own projects. But then again, I'm truly no C guru.

  • Custom User Avatar

    But it's after the "return" statement. Does it really useful here?

  • Default User Avatar

    Hello, and welcome!
    It's a function to free the memory allocated to the pointer final by malloc : )

  • Custom User Avatar

    I am a new Cer,can you tell me the use for the "free(final)" here?

  • Custom User Avatar

    @MariusAFT,

    The return value is supposed to be a string -> "None"

    >>> type(None)    # not this None
    <class 'NoneType'>
    >>> type('None')  # this "None"
    <class 'str'>
    
    
  • Default User Avatar

    Hello,
    I am getting this error when it tests for "Weird": Should return None: None should equal 'None'

    Anybody knows why?

  • Custom User Avatar

    @Dragoris,

    As @nap4lm already mentioned, the random tests on the Python version of this kata don't work because import re is not at the top of the main test cases.

    My solution does not use re but I still had to import it to get the random tests to run.

  • Default User Avatar

    Hello Mate!
    I had a problem, I solved it without regular expressions. But it still needed me to import re.
    Not that big of a deal but just so you know :)