0
How to display this output in python?
It should be made using for loop Output : 1 21 321 4321 54321 1 12 123 1234 12345
3 Answers
0
public class Program
{
public static void main(String[] args) {
String k="4321";
for(int i=0;i<k.length();i++){
for(int j=0;j<i+1;j++){
System.out.print(k.charAt(j));
}
System.out.println(" ");
}
}
}
0
How could you print 54321 with loop?