• + 2 comments

    firstly, he prints it without the spaces, so it looks like this

    #
    ##
    ###
    ####
    

    then he uses rjust just to right justify the above string and fill the empty gaps with spaces. Afer that, it looks like this:

       #
      ##
     ###
    ####
    

    Sorry for my bad english