Translation / Exercise (Make a triangle shape) from C to python

I want to make this code in C, in the python, but it has one is different and I can not do it

# include 

int main (void) {noun
int in, lines, x; scanf ("% d", & num);

(1 <= in a <= 30) {
(lines = 1, lines <= num, lines ++) {
printf (" n% d", lines);
(x = 1, x <rows, x ++) {
printf ("% d", lines);
}
}
}

return 0;
}