Policz nową linię w Pythonie String

length = x.count('\n')
Kind Kangaroo