question about testing in shell programming

Hi i would like to write a "script" which takes a directory as an argument and the script will output the content of a file in this directory.Here is my code

#!/bin/sh
#set an argument to be a specified path
$1=/home/tuan/Desktop/Shell_programming/directory

#check if an argument is a directory
if [ ! -d $1 ]
then
	for number in $1
		do 
		echo "$number"
	done<list
else
	echo "No such that directory "
fi

After that in terminal I did:

tuan@tuan:~/Desktop/Shell_programming$ ./A3 directory
./A3: 2: directory=/home/tuan/Desktop/Shell_programming/directory: not found
No such that directory 
tuan@tuan:~/Desktop/Shell_programming$ 

It seems there are mistakes. Can anyone point it out for me.
PS: In "directory" directory, I did created a file named "list" like below

1
2
3

Try to use something else than "$1" as the variable name... e.g.

#!/bin/sh
#set an argument to be a specified path
a=/home/tuan/Desktop/Shell_programming/directory

#check if an argument is a directory
if [ -d $a ]
then
	for number in $a
		do 
		echo "$number"
	done
else
	echo "No such that directory "
fi

here is the new one (with modification)

#!/bin/sh
#set an argument to be a specified path
a=/home/tuan/Desktop/Shell_programming/directory/list
#check if an argument is a directory
if [ ! -d $a ]
then
	for number in $a
		do 
		echo "$number"
	done
else
	echo "No such that directory "
fi

However, the output is

tuan@tuan:~/Desktop/Shell_programming$ ./A3
/home/tuan/Desktop/Shell_programming/directory/list
tuan@tuan:~/Desktop/Shell_programming$ 

I have no idea.......

The way to loop over files in a directory is to list them.

for number in "$a"/*; do ...

If you want to constrain this to just files whose names are a number, use a different wildcard. This loops over all files in the selected directory.