String Size Function In Python With Parameters In Java