I have a circular plasmid about 8 thousand in size. I exposed it to Hind and PstI, together and separately. The resulting fragments are Hind 4000, 2500, 1000, 500. Pst 5000, 2200, 750. Hind+Pst 3500, 2200, 1000, 700, 500, 250. We need to build a restriction map.
Not sure why you need python for this. Any programming language that has simple mathematical operations can do this. In fact, your problem is simple enough to do it manually. Keep in mind that you already know that there are 4 Hind and 3 Pst cuts, assuming all your digests went to completion.
First, you are missing 50 bp in Pst and Hind+Pst cut, so that needs to be fixed. Second, you look at which combination of fragments from a double digest matches best explains fragments in single digest, and that will get you going in your reconstruction. For example, the 2200 fragment from Pst digest can be explained by the same-size fragment from a double digest. If that were the case, you could draw a plasmid stretch that is 2200 bp long and put Pst sites at its ends, which would give you a corner of the puzzle. However, you are 50 bp short in two of your digests, so your fragment may be 2250 instead, which you could get by cutting a 2500 Hind fragment into 2250 and 250. Until you get the correct numbers down, it may be impossible to do the reconstruction, but either way it is a matter of simple combinatorics.
Please do not post similar questions in multiple threads: How can i build a restriction map ?
It is almost a guarantee that it is a homework. The whole procedure is articulated better than what I did below in this video.