Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

print pattern a shape in python

result_str="";    
for row in range(0,7):    
    for column in range(0,7):     
        if (((column == 1 or column == 5) and row != 0) or ((row == 0 or row == 3) and (column > 1 and column < 5))):    
            result_str=result_str+"*"    
        else:      
            result_str=result_str+" "    
    result_str=result_str+"
"    
print(result_str);
Comment

PREVIOUS NEXT
Code Example
Python :: matplotlib show grid for log or logit 
Python :: how to use enumerate in python 
Python :: count number of spaces in string python 
Python :: remove env variable python 
Python :: migrate data django 
Python :: fstring 
Python :: pvm python 
Python :: plot background color matplotlib 
Python :: generate a random letter using python 
Python :: django models.py convert DateTimeField to DateField 
Python :: pandas pivot 
Python :: python kill all threads 
Python :: change the frequency to column in pandas 
Python :: esp8266 micropython ds18b20 
Python :: fast fourier transform python 
Python :: python check if number is integer or float 
Python :: extract tgz files in python 
Python :: Chi-Squared test in python 
Python :: Select rows in pandas MultiIndex DataFrame 
Python :: django ModelChoiceField value not id 
Python :: skip to next iteration in for loop python 
Python :: concat all df in a diction 
Python :: first column of a dataframe python 
Python :: how to sort list of dictionaries in python 
Python :: discord.py get channel id by channel name 
Python :: create a blank image 
Python :: % operatior in python print 
Python :: insert data in table python 
Python :: how to change size of turtle in python 
Python :: python read file from same directory 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =